1
0

Auto key detection

This commit is contained in:
Davide Tonelli
2022-08-09 10:59:25 +02:00
parent 8cf9778872
commit 4a4f1b3803
+4
View File
@@ -25,6 +25,10 @@ def shape_selection(event, x, y, flags, param):
cv2.rectangle(image, ref_point[0], ref_point[1], (0, 255, 0), 2)
cv2.imshow("image", image)
key_rel_path= os.path.join('..', 'keys', 'developerKey.json')
key = os.path.abspath(key_rel_path)
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = key
# User input from the command line
image_name = sys.argv[1]