File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def get_plate_numbers_for_rec_plate(plate_image):
54
54
padding [180 :290 , 0 :470 , :] = plate_image
55
55
# padding = cv2.cvtColor(np.float32(padding), cv2.COLOR_BGR2GRAY)
56
56
# padding = cv2.merge((padding, padding, padding))
57
- cv2 .imwrite ("temp.jpg" , padding )
57
+ # cv2.imwrite("temp.jpg", padding)
58
58
padding_resize = Image .fromarray (np .uint8 (padding )).convert ('RGB' )
59
59
# path = "/home/vdtc/ALPR/test_components/data_2022_03_29/plate_image_train/%d.jpg" % image_count
60
60
# padding_resize.save(path)
Original file line number Diff line number Diff line change
1
+ import base64
2
+ import time
3
+ import requests
4
+
5
+
6
+ imgPath = "/home/datbt/ALPR/data_2022_03_29/camera_bienso/2233785415252557522_1_0_03_20220329021230.jpg"
7
+ with open (imgPath , "rb" ) as image_file :
8
+ encodedByte = base64 .b64encode (image_file .read ())
9
+ encodedString = encodedByte .decode ('utf-8' )
10
+ t = time .time ()
11
+ req = requests .post ("http://127.0.0.1:8765/detect_plate_base64" , data = {"image" : encodedString })
12
+ t = time .time () - t
13
+ print (req .text , t )
You can’t perform that action at this time.
0 commit comments