Commit 8bdd3716 authored by Bruce's avatar Bruce

Update Accuracy_Testing.ipynb

parent c19ecfad
......@@ -142,6 +142,7 @@
"from hyperlpr import calculation_raito_origin as fm\n",
"from hyperlpr import finemapping_vertical as fv\n",
"from hyperlpr import segmentation_0124 as segmentation\n",
"import plate_judgment\n"
"\n",
"\n",
"import numpy as np\n",
......@@ -165,17 +166,16 @@
"\n",
"###車牌辨識方法\n",
"def MYSimpleRecognizePlate(img):\n",
" car=img\n",
" w,h=car.shape[:2]\n",
" h=int(w*500/h)\n",
" w=500\n",
" car=cv2.resize(car,(w,h))\n",
" images=detect.detectPlateRough(car,car.shape[0])\n",
" y1,y2,x1,x2=0,1080,0,1000 ##限定區域\n"
" car=img[y1:y2,x1:x2]\n",
" images=detect.detectPlateRough(car,500)\n",
"\n",
" origin_plate_list=[]\n",
" image_rgb_rl_list=[]\n",
" for j,plate in enumerate(images):\n",
" plate, rect, origin_plate,flg =plate\n",
" judgment_type=plate_judgment.SimplePredict(origin_plate)"
" if(judgment_type==0):"
" img =cv2.resize(origin_plate,(300,100))\n",
" img = cv2.bitwise_not(img)\n",
" ### 車排上下定位\n",
......@@ -220,7 +220,7 @@
" ### 辨識結果\n",
" print('車牌',name,'可信度',con,'字數',nums)\n",
" \n",
" return cut_data\n",
" return name,con,nums\n",
" \n",
" \n",
"LPR=MYSimpleRecognizePlate(img)\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment