Browse Source

[update]:防止由于车牌占用大,导致检测模型识别失败 的测试用例

master
divenswu 1 year ago
parent
commit
c6c9793d10
  1. 10
      open-anpr-test/src/main/java/com/visual/open/anpr/exps/PlateRecognitionExample.java
  2. BIN
      open-anpr-test/src/main/resources/image1/75a6f232_7346047.jpeg
  3. BIN
      open-anpr-test/src/main/resources/image1/c4145e27_7346047.jpeg
  4. BIN
      open-anpr-test/src/main/resources/image1/f7759908_7346047.png

10
open-anpr-test/src/main/java/com/visual/open/anpr/exps/PlateRecognitionExample.java

@ -15,9 +15,9 @@ public class PlateRecognitionExample {
static{ nu.pattern.OpenCV.loadShared(); }
//本地开发模式
// public static String serverHost = "http://127.0.0.1:8080";
public static String serverHost = "http://127.0.0.1:8080";
//docker部署模式
public static String serverHost = "http://172.16.36.228:56790";
// public static String serverHost = "http://127.0.0.1:56790";
//远程测试服务
//public static String serverHost = "http://open-anpr.diven.nat300.top";
@ -27,14 +27,14 @@ public class PlateRecognitionExample {
public static void recognition() {
String searchPath = "open-anpr-test/src/main/resources/image";
File [] files = Objects.requireNonNull(new File(searchPath).listFiles());
// for(int u=0; u<=1000; u++)
for(int i=0; i< files.length-1; i++){
System.out.println(files.length);
for(int i=0; i < files.length; i++){
System.out.println(i);
File imageA = files[i];
String imageBase64 = Base64Util.encode(imageA.getAbsolutePath());
Response<List<RecognitionRep>> response = plateRecognition.detection().recognition(
Recognition.build().setImage(imageBase64).setLimit(5)
);
DrawImage drawImage = DrawImage.build(imageA.getAbsolutePath());
if(response.ok()){
for(RecognitionRep recognitionRep : response.getData()){

BIN
open-anpr-test/src/main/resources/image1/75a6f232_7346047.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 KiB

BIN
open-anpr-test/src/main/resources/image1/c4145e27_7346047.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
open-anpr-test/src/main/resources/image1/f7759908_7346047.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 KiB

Loading…
Cancel
Save