-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_cli.py
25 lines (21 loc) · 1.15 KB
/
main_cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import extraction, crop, compare
print("\nSelect an option:\n1. Signature Extraction only.\n2. Signature Comparison only.\n3. Both Signature Extraction and Comparison.\n4. Exit")
option = int(input("\nEnter an option (1 - 4): "))
if (option in (1, 2, 3, 4)):
if (option == 1):
src_img_path = input("\nEnter the name or path of the source image file: ")
extraction.extract(src_img_path, "cli")
elif (option == 2):
src_img_path = input("\nEnter the name or path of the source image file: ")
ref_img_path = input("\nEnter the name or path of the reference image file: ")
compare.compare(src_img_path, ref_img_path, "cli")
elif (option == 3):
print("\nSignature Extraction:")
src_img_path = input("\nEnter the name or path of the source image file: ")
extraction.extract(src_img_path, "cli")
print("\nSignature Comparison:")
src_img_path = input("\nEnter the name or path of the source image file: ")
ref_img_path = input("\nEnter the name or path of the reference image file: ")
compare.compare(src_img_path, ref_img_path, "cli")
else:
print("\nEnter a valid option.")