-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabsolute_coordinates.py
More file actions
27 lines (19 loc) · 842 Bytes
/
absolute_coordinates.py
File metadata and controls
27 lines (19 loc) · 842 Bytes
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
26
27
from Coordinates.find_absolute import repere_absolu,find_pads
import sys
"""
This file is used to find the absolute coordinate system of an image, enabling us to find later on the positions of the pads,... on a
given image
NB : There also is a function to find the positions of the pads inside "find_absolute.py", it is unused as of now but it works.
Arguments
-----------
path - str : the path to the image to analyse.
draw - bool (Optional) : whether or not to return images of evey step of the process.
Returns : Prints the transition matrix to the absolute coordinate system, as well as its origin and the dilatation of the given image
"""
if __name__ == '__main__' :
path = sys.argv[1]
if len(sys.argv) == 2 :
print(repere_absolu(path))
else :
draw=sys.argv[2]
print(repere_absolu(path,draw))