README
This commit is contained in:
@@ -1,68 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'maven-publish'
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//// 必须在 android 上面
|
|
||||||
//apply from: '../publish-mavencentral.gradle'
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdk 31
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdk 22
|
|
||||||
targetSdk 31
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
|
||||||
|
|
||||||
ndk { abiFilters "armeabi-v7a", "arm64-v8a" }
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
jniLibs.srcDirs = ['libs']
|
|
||||||
assets.srcDirs = ['src/main/assets']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
||||||
implementation 'com.google.android.material:material:1.3.0'
|
|
||||||
testImplementation 'junit:junit:4.+'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
|
||||||
implementation 'com.github.smuyyh:ImageSelector:3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
// 官方建议使用上传方法
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
// Creates a Maven publication called "release".
|
|
||||||
release(MavenPublication) {
|
|
||||||
from components.release // 表示发布 release(jitpack 都不会使用到)
|
|
||||||
groupId = 'com.github.tunmx' //groupId 随便取 , 这个是依赖库的组 id
|
|
||||||
artifactId = 'hyperlpr3' //artifactId 随便取 , 依赖库的名称(jitpack 都不会使用到)
|
|
||||||
version = '0.0.1' // 当前版本依赖库版本号,这个jitpack不会使用到,只是我们开发者自己查看
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-2
@@ -14,7 +14,7 @@ def draw_plate_on_image(img, box, text, font):
|
|||||||
cv2.rectangle(img, (x1, y1 - 20), (x2, y1), (139, 139, 102), -1)
|
cv2.rectangle(img, (x1, y1 - 20), (x2, y1), (139, 139, 102), -1)
|
||||||
data = Image.fromarray(img)
|
data = Image.fromarray(img)
|
||||||
draw = ImageDraw.Draw(data)
|
draw = ImageDraw.Draw(data)
|
||||||
draw.text((x1 + 1, y1 - 18), text, (255, 255, 255), font=font)
|
draw.text((x1 + 5, y1 - 20), text, (255, 255, 255), font=font)
|
||||||
res = np.asarray(data)
|
res = np.asarray(data)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
@@ -26,7 +26,7 @@ font_ch = ImageFont.truetype("../resource/font/platech.ttf", 20, 0)
|
|||||||
# 实例化识别对象
|
# 实例化识别对象
|
||||||
catcher = lpr3.LicensePlateCatcher(detect_level=lpr3.DETECT_LEVEL_HIGH)
|
catcher = lpr3.LicensePlateCatcher(detect_level=lpr3.DETECT_LEVEL_HIGH)
|
||||||
# 读取图片
|
# 读取图片
|
||||||
image = cv2.imread("/Users/tunm/datasets/boundingbox/[[359, 1292], [487, 1292], [487, 1324], [359, 1324]].jpg")
|
image = cv2.imread("/Users/tunm/Downloads/tlj.webp")
|
||||||
|
|
||||||
# 执行识别算法
|
# 执行识别算法
|
||||||
results = catcher(image)
|
results = catcher(image)
|
||||||
|
|||||||
@@ -302,6 +302,10 @@ Know more about: **[Prj-Android](./Prj-Android)**
|
|||||||
|
|
||||||
- Android APP:[Scan QR Code](http://fir.tunm.top/hyperlpr)
|
- Android APP:[Scan QR Code](http://fir.tunm.top/hyperlpr)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
#### Help
|
#### Help
|
||||||
|
|
||||||
- HyperInspire QQ Group: 529385694
|
- HyperInspire QQ Group: 529385694
|
||||||
|
|||||||
@@ -304,6 +304,11 @@ Plate[] plates = HyperLPR3.getInstance().plateRecognition(bitmap, HyperLPR3.CAM
|
|||||||
|
|
||||||
- 体验 Android APP:[扫码下载](http://fir.tunm.top/hyperlpr)
|
- 体验 Android APP:[扫码下载](http://fir.tunm.top/hyperlpr)
|
||||||
|
|
||||||
|
### 效果示例
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
#### 获取帮助
|
#### 获取帮助
|
||||||
|
|
||||||
- HyperInspire讨论QQ群: 529385694,加前请备注HyperLPR交流
|
- HyperInspire讨论QQ群: 529385694,加前请备注HyperLPR交流
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
Reference in New Issue
Block a user