remote-run-everything 2.0.7__tar.gz → 2.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {remote_run_everything-2.0.7/remote_run_everything.egg-info → remote_run_everything-2.0.8}/PKG-INFO +40 -2
  2. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/README.md +39 -1
  3. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/pyproject.toml +2 -2
  4. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/__init__.py +1 -0
  5. remote_run_everything-2.0.8/remote_run_everything/binocular/ba_front.py +72 -0
  6. remote_run_everything-2.0.8/remote_run_everything/binocular/back_tool.py +123 -0
  7. remote_run_everything-2.0.8/remote_run_everything/binocular/cam_tool.py +26 -0
  8. remote_run_everything-2.0.8/remote_run_everything/binocular/front_tool.py +39 -0
  9. remote_run_everything-2.0.8/remote_run_everything/binocular/relative_pos.py +142 -0
  10. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/tools/common1.py +22 -3
  11. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8/remote_run_everything.egg-info}/PKG-INFO +40 -2
  12. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything.egg-info/SOURCES.txt +7 -1
  13. remote_run_everything-2.0.8/test/test_binocular.py +14 -0
  14. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/LICENSE +0 -0
  15. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/MANIFEST.in +0 -0
  16. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/db/__init__.py +0 -0
  17. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/db/backup.py +0 -0
  18. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/db/crud_sqlalchemy.py +0 -0
  19. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/db/crude_duck.py +0 -0
  20. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/db/kv_store.py +0 -0
  21. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/deploy/__init__.py +0 -0
  22. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/deploy/by_http.py +0 -0
  23. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/deploy/by_http_tool.py +0 -0
  24. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/deploy/by_sftp.py +0 -0
  25. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/deploy/record_mod.py +0 -0
  26. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/nosql/__init__.py +0 -0
  27. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/nosql/no_sql.py +0 -0
  28. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/nosql/no_sql_mysql.py +0 -0
  29. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/nosql/no_sql_pg.py +0 -0
  30. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/nosql/no_sql_tool.py +0 -0
  31. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/tools/__init__.py +0 -0
  32. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/tools/common.py +0 -0
  33. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/tools/decorators.py +0 -0
  34. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/tools/sqlacodegen_go_struct.py +0 -0
  35. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/vsconf/conf_txt.py +0 -0
  36. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything/vsconf/core.py +0 -0
  37. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything.egg-info/dependency_links.txt +0 -0
  38. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/remote_run_everything.egg-info/top_level.txt +0 -0
  39. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/setup.cfg +0 -0
  40. {remote_run_everything-2.0.7 → remote_run_everything-2.0.8}/test/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remote_run_everything
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: Deploy Tools
5
5
  Author-email: Wang Qi <wangmarkqi@gmail.com>
6
6
  License-Expression: MIT
@@ -27,7 +27,7 @@ from remote_run_everything import cherrypy_in_daemon,ByHttpServer
27
27
  cherrypy_in_daemon(ByHttpServer,8888,"/deploy")
28
28
 
29
29
  # 上推代码
30
- from remote_run_everything import ByHttp
30
+ from remote_run_everything import ByHttp ,BySftp
31
31
  def test_up():
32
32
  host = "http://x.x.x.x:8888/deploy"
33
33
  local = "D://project/demand/shop"
@@ -35,6 +35,13 @@ def test_up():
35
35
  db = "D://wq/temp/shop.db"
36
36
  bh = ByHttp(host, local, remote, db)
37
37
  bh.up(['node_modules', ".pyc", ".idea"])
38
+ def test_up2():
39
+ host = "http://x.x.x.x:8888/deploy"
40
+ local = "D://project/demand/shop"
41
+ remote = "/data/mypy/shop"
42
+ db = "D://wq/temp/shop.db"
43
+ by=BySftp(host,22,'root','pwd',local,remote,db)
44
+ by.up(['node_modules', ".pyc", ".idea", ".pdf", ".docx", ".pickle", ".png", ".jpg",".venv","target","dist","build"])
38
45
 
39
46
  # 下拉代码
40
47
  def test_down():
@@ -94,6 +101,7 @@ db.drop_db()
94
101
  ```
95
102
  ## 进程管理
96
103
  ```python
104
+ import os
97
105
  class ProcessManage:
98
106
  # nosql is instance of Nosql or Nosqlmysql or Nqsqlpg
99
107
  def __init__(self, nosql):
@@ -107,3 +115,33 @@ class ProcessManage:
107
115
  self.col.insert_one(dic)
108
116
 
109
117
  ```
118
+ ## 缓存装饰器
119
+ ```python
120
+ from remote_run_everything import cache_by_1starg,cache_by_name,cache_by_rkey,cache_by_nth_arg
121
+ @cache_by_name("asdf", 1)
122
+ def test_dec():
123
+ print("运行了函数!!!!!!!!!!!!!!!!")
124
+ return {"a": "adaf"}
125
+
126
+
127
+ ```
128
+
129
+ ## 关系型 数据库
130
+ ```python
131
+ from remote_run_everything import Crud,CrudeDuck
132
+ # 详情参见类方法
133
+ ```
134
+
135
+ ## 双目测距
136
+ ```python
137
+ from remote_run_everything.binocular.relative_pos import RelativePos,CamTool
138
+ import numpy as np
139
+ unit=0.006240084611316764
140
+ l=[[3838.36767578125, 50.56350326538086], [2636.24072265625, 88.38832092285156], [511.72705078125, 95.95327758789062], [2303.57666015625, 107.30072784423828], [2159.92626953125, 111.08320617675781], [2001.15478515625, 114.86569213867188], ]
141
+ r=[[3743.86083984375, 31.651092529296875], [2424.54541015625, 65.69342803955078], [231.98681640625, 69.47590637207031], [2076.76025390625, 84.6058349609375], [1921.76904296875, 88.38832092285156], [1759.21728515625, 92.1707992553711]]
142
+ l=np.array(l)
143
+ r=np.array(r)
144
+ path="./nik_insinc.txt"
145
+ dic = RelativePos(path,path,unit,unit).rel_one(l, r)
146
+ print (dic)
147
+ ```
@@ -12,7 +12,7 @@ from remote_run_everything import cherrypy_in_daemon,ByHttpServer
12
12
  cherrypy_in_daemon(ByHttpServer,8888,"/deploy")
13
13
 
14
14
  # 上推代码
15
- from remote_run_everything import ByHttp
15
+ from remote_run_everything import ByHttp ,BySftp
16
16
  def test_up():
17
17
  host = "http://x.x.x.x:8888/deploy"
18
18
  local = "D://project/demand/shop"
@@ -20,6 +20,13 @@ def test_up():
20
20
  db = "D://wq/temp/shop.db"
21
21
  bh = ByHttp(host, local, remote, db)
22
22
  bh.up(['node_modules', ".pyc", ".idea"])
23
+ def test_up2():
24
+ host = "http://x.x.x.x:8888/deploy"
25
+ local = "D://project/demand/shop"
26
+ remote = "/data/mypy/shop"
27
+ db = "D://wq/temp/shop.db"
28
+ by=BySftp(host,22,'root','pwd',local,remote,db)
29
+ by.up(['node_modules', ".pyc", ".idea", ".pdf", ".docx", ".pickle", ".png", ".jpg",".venv","target","dist","build"])
23
30
 
24
31
  # 下拉代码
25
32
  def test_down():
@@ -79,6 +86,7 @@ db.drop_db()
79
86
  ```
80
87
  ## 进程管理
81
88
  ```python
89
+ import os
82
90
  class ProcessManage:
83
91
  # nosql is instance of Nosql or Nosqlmysql or Nqsqlpg
84
92
  def __init__(self, nosql):
@@ -92,3 +100,33 @@ class ProcessManage:
92
100
  self.col.insert_one(dic)
93
101
 
94
102
  ```
103
+ ## 缓存装饰器
104
+ ```python
105
+ from remote_run_everything import cache_by_1starg,cache_by_name,cache_by_rkey,cache_by_nth_arg
106
+ @cache_by_name("asdf", 1)
107
+ def test_dec():
108
+ print("运行了函数!!!!!!!!!!!!!!!!")
109
+ return {"a": "adaf"}
110
+
111
+
112
+ ```
113
+
114
+ ## 关系型 数据库
115
+ ```python
116
+ from remote_run_everything import Crud,CrudeDuck
117
+ # 详情参见类方法
118
+ ```
119
+
120
+ ## 双目测距
121
+ ```python
122
+ from remote_run_everything.binocular.relative_pos import RelativePos,CamTool
123
+ import numpy as np
124
+ unit=0.006240084611316764
125
+ l=[[3838.36767578125, 50.56350326538086], [2636.24072265625, 88.38832092285156], [511.72705078125, 95.95327758789062], [2303.57666015625, 107.30072784423828], [2159.92626953125, 111.08320617675781], [2001.15478515625, 114.86569213867188], ]
126
+ r=[[3743.86083984375, 31.651092529296875], [2424.54541015625, 65.69342803955078], [231.98681640625, 69.47590637207031], [2076.76025390625, 84.6058349609375], [1921.76904296875, 88.38832092285156], [1759.21728515625, 92.1707992553711]]
127
+ l=np.array(l)
128
+ r=np.array(r)
129
+ path="./nik_insinc.txt"
130
+ dic = RelativePos(path,path,unit,unit).rel_one(l, r)
131
+ print (dic)
132
+ ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "remote_run_everything"
3
- version = "2.0.7"
3
+ version = "2.0.8"
4
4
  authors = [
5
5
  { name="Wang Qi", email="wangmarkqi@gmail.com" },
6
6
  ]
@@ -19,5 +19,5 @@ Homepage = 'https://github.com/wangmarkqi/remote_run_everything'
19
19
  Issues = "https://github.com/wangmarkqi/remote_run_everything/issues"
20
20
 
21
21
  [build-system]
22
- requires = ["setuptools>=40.8.0", "wheel","sqlalchemy","arrow","duckdb","requests","paramiko"]
22
+ requires = ["setuptools>=40.8.0", "wheel","numpy","sqlalchemy","arrow","duckdb","requests","paramiko"]
23
23
  build-backend = "setuptools.build_meta"
@@ -14,3 +14,4 @@ from remote_run_everything.nosql.no_sql import Nosql
14
14
  from remote_run_everything.nosql.no_sql_pg import NosqlPg
15
15
  from remote_run_everything.nosql.no_sql_mysql import NosqlMysql
16
16
  from remote_run_everything.vsconf.core import VsConf
17
+ from remote_run_everything.binocular.relative_pos import RelativePos
@@ -0,0 +1,72 @@
1
+ import numpy as np
2
+ from remote_run_everything.binocular.back_tool import BackTool
3
+ from remote_run_everything.binocular.front_tool import FrontTool
4
+ from remote_run_everything.binocular.cam_tool import CamTool
5
+
6
+ # 4.213158 0.669677 -3.907534 -0.750835 60 0 -60
7
+ # 内方位元素:f,x0,y0 单位mm
8
+
9
+ class BaFront:
10
+ def __init__(self, f1, f2, s1, s2, angle1, angle2, u1, v1, u2, v2):
11
+ # 内方位元素:f,x0,y0 单位mm
12
+ self.f1 = f1
13
+ self.f2 = f2
14
+ # 左右像片外方位元素 单位mm
15
+ self.S1 = s1
16
+ self.S2 = s2
17
+ self.angle1 = angle1
18
+ self.angle2 = angle2
19
+ self.u1 = u1
20
+ self.v1 = v1
21
+ self.u2 = u2
22
+ self.v2 = v2
23
+ self.ftool = FrontTool()
24
+ self.btool1 = BackTool(self.f1, u1, v1)
25
+ self.btool2 = BackTool(self.f2, u2, v2)
26
+ self.max_step = 1000000
27
+
28
+ def first_cpt(self):
29
+ # 计算基线分量,L.R为左右像片线元素
30
+ B = self.S2 - self.S1
31
+ R1 = CamTool().calcR(*self.angle1)
32
+ R2 = CamTool().calcR(*self.angle2)
33
+ XYZ1 = self.ftool.coordinate(R1, self.u1, self.v1, self.f1) # 左片像空间辅助坐标
34
+ XYZ2 = self.ftool.coordinate(R2, self.u2, self.v2, self.f2) # 右片像空间辅助坐标
35
+ N = self.ftool.genN(B, XYZ1, XYZ2)
36
+ XYZ = self.ftool.xyz(self.S1, XYZ1, N)
37
+ # CamTool().view_pcd(gp)
38
+ return XYZ
39
+
40
+ def refine(self, XYZ, which):
41
+ X = XYZ[:, 0]
42
+ Y = XYZ[:, 1]
43
+ Z = XYZ[:, 2]
44
+ if which == 1:
45
+ btool = self.btool1
46
+ X0, Y0, Z0 = self.S1.tolist()
47
+ phi, omega, kappa = self.angle1
48
+ else:
49
+ btool = self.btool2
50
+ X0, Y0, Z0 = self.S2.tolist()
51
+ phi, omega, kappa = self.angle2
52
+ for i in range(self.max_step):
53
+ L = btool.genL(X, Y, Z, phi, omega, kappa, X0, Y0, Z0)
54
+ A, B = btool.genAB(X, Y, Z, phi, omega, kappa, X0, Y0, Z0)
55
+ dxyz = btool.genDxyz(B, L)
56
+
57
+ # ex[dxs,dys,dzs,dphi,domega,dkappa]
58
+ X += dxyz[0]
59
+ Y += dxyz[1]
60
+ Z += dxyz[2]
61
+
62
+ limit = 0.00001
63
+ if np.abs(dxyz[0]) < limit or np.abs(dxyz[1]) < limit or np.abs(dxyz[2]) < limit:
64
+ err = np.mean(np.abs(dxyz))
65
+ return XYZ, err
66
+
67
+ def refine_all(self, XYZ):
68
+ xyz1, err1 = self.refine(XYZ, 1)
69
+ xyz2, err2 = self.refine(XYZ, 2)
70
+ xyz = (xyz1 + xyz2) / 2
71
+ return xyz, (err1 + err2) / 2
72
+
@@ -0,0 +1,123 @@
1
+ """
2
+ 后方交会代码
3
+ 作者:Dash
4
+ version:0.1
5
+ without any optimization
6
+ """
7
+ import numpy as np
8
+
9
+
10
+ class BackTool(object):
11
+ def __init__(self, f, u, v):
12
+ self.f = f
13
+ self.u = u
14
+ self.v = v
15
+ self.max_step = 1000000
16
+
17
+ def init_param(self, X, Y, Z, scale):
18
+ n = len(X)
19
+ # initial line paras
20
+ Z0 = scale * self.f + (1 / n) * np.sum(Z)
21
+ X0 = (1 / n) * np.sum(X)
22
+ Y0 = (1 / n) * np.sum(Y)
23
+ return X0, Y0, Z0
24
+
25
+ def genL(self, X, Y, Z, phi, omega, kappa, X0, Y0, Z0):
26
+ R = CamTool().calcR(phi, omega, kappa)
27
+ a1, a2, a3, b1, b2, b3, c1, c2, c3 = [i for l in R.tolist() for i in l]
28
+ L = []
29
+ for j in range(len(self.u)):
30
+ numerator_x = self.f * (a1 * (X[j] - X0) + b1 * (Y[j] - Y0) + c1 * (Z[j] - Z0))
31
+ numerator_y = self.f * (a2 * (X[j] - X0) + b2 * (Y[j] - Y0) + c2 * (Z[j] - Z0))
32
+ denomanator = (a3 * (X[j] - X0) + b3 * (Y[j] - Y0) + c3 * (Z[j] - Z0))
33
+ lx = self.u[j] + numerator_x / denomanator
34
+ ly = self.v[j] + numerator_y / denomanator
35
+ L.append(lx)
36
+ L.append(ly)
37
+ L = np.array(L,dtype=np.float32)
38
+ return L
39
+
40
+ def genAB(self, X, Y, Z, phi, omega, kappa, X0, Y0, Z0):
41
+ R = CamTool().calcR(phi, omega, kappa)
42
+ a1, a2, a3, b1, b2, b3, c1, c2, c3 = [i for l in R.tolist() for i in l]
43
+ num_of_samples = len(self.u)
44
+
45
+ a11 = np.zeros(num_of_samples, dtype=np.float32)
46
+ a12 = np.zeros(num_of_samples, dtype=np.float32)
47
+ a13 = np.zeros(num_of_samples, dtype=np.float32)
48
+
49
+ a14 = np.zeros(num_of_samples, dtype=np.float32)
50
+ a15 = np.zeros(num_of_samples, dtype=np.float32)
51
+ a16 = np.zeros(num_of_samples, dtype=np.float32)
52
+
53
+ a21 = np.zeros(num_of_samples, dtype=np.float32)
54
+ a22 = np.zeros(num_of_samples, dtype=np.float32)
55
+ a23 = np.zeros(num_of_samples, dtype=np.float32)
56
+ a24 = np.zeros(num_of_samples, dtype=np.float32)
57
+ a25 = np.zeros(num_of_samples, dtype=np.float32)
58
+ a26 = np.zeros(num_of_samples, dtype=np.float32)
59
+
60
+ for j in range(num_of_samples):
61
+ z_bar = a3 * (X[j] - X0) + b3 * (Y[j] - Y0) + c3 * (Z[j] - Z0)
62
+ a11[j] = (a1 * self.f + a3 * self.u[j]) / z_bar
63
+ a12[j] = (b1 * self.f + b3 * self.u[j]) / z_bar
64
+ a13[j] = (c1 * self.f + c3 * self.u[j]) / z_bar
65
+ a14[j] = (self.v[j] * np.sin(omega)) - (self.u[j] * (
66
+ self.u[j] * np.cos(kappa) - self.v[j] * np.sin(kappa)) / self.f + self.f * np.cos(
67
+ kappa)) * np.cos(omega)
68
+ a15[j] = -self.f * np.sin(kappa) - (self.u[j] / self.f) * (
69
+ self.u[j] * np.sin(kappa) + self.v[j] * np.cos(kappa))
70
+ a16[j] = self.v[j]
71
+
72
+ a21[j] = (a2 * self.f + a3 * self.v[j]) / z_bar
73
+ a22[j] = (b2 * self.f + b3 * self.v[j]) / z_bar
74
+ a23[j] = (c2 * self.f + c3 * self.v[j]) / z_bar
75
+ a24[j] = -self.u[j] * np.sin(omega) - (self.v[j] / self.f) * (
76
+ (self.u[j] * np.cos(kappa) - self.v[j] * np.sin(kappa)) - self.f * np.sin(
77
+ kappa)) * np.cos(omega)
78
+ a25[j] = -self.f * np.cos(kappa) - (self.v[j] / self.f) * (
79
+ self.u[j] * np.sin(kappa) + self.v[j] * np.cos(kappa))
80
+ a26[j] = -self.u[j]
81
+
82
+ A = np.zeros((2 * num_of_samples, 6), dtype=np.float32)
83
+ B = np.zeros((2 * num_of_samples, 3), dtype=np.float32)
84
+ for j in range(num_of_samples):
85
+ A[2 * j:2 * j + 2, :] = np.array([
86
+ [a11[j], a12[j], a13[j], a14[j], a15[j], a16[j]],
87
+ [a21[j], a22[j], a23[j], a24[j], a25[j], a26[j]]
88
+ ], dtype=np.float32)
89
+ B[2 * j:2 * j + 2, :] = np.array([
90
+ [-a11[j], -a12[j], -a13[j]],
91
+ [-a21[j], -a22[j], -a23[j]]
92
+ ], dtype=np.float32)
93
+ return A, B
94
+
95
+ def genT_noba(self, A, L):
96
+
97
+ AtA = np.dot(A.T, A)
98
+ inverse_AtA = np.linalg.inv(AtA)
99
+ print(333, inverse_AtA)
100
+ combine = np.dot(inverse_AtA, A.T)
101
+ X = np.dot(combine, L)
102
+ return X
103
+
104
+ def genT(self, A, B, L):
105
+ N11 = A.T @ A
106
+ N12 = A.T @ B
107
+ N21 = B.T @ A
108
+ N22 = B.T @ B
109
+ M1 = A.T @ L
110
+ M2 = B.T @ L
111
+ right = M1 - N12 @ np.linalg.inv(N22) @ M2
112
+ left = N11 - N12 @ np.linalg.inv(N22) @ N21
113
+ print("begin inv")
114
+ left_inv = np.linalg.inv(left)
115
+ print("inv", left_inv)
116
+ t = np.dot(left_inv, right)
117
+ return t
118
+
119
+ def genDxyz(self, B, L):
120
+ inverse_BtB = np.linalg.inv(np.dot(B.T, B))
121
+ combine = np.dot(inverse_BtB, B.T)
122
+ X = np.dot(combine, L)
123
+ return X
@@ -0,0 +1,26 @@
1
+ import os
2
+ import numpy as np
3
+
4
+ class CamTool:
5
+ def calcR(self, phi, omega, kappa):
6
+ a1 = np.cos(phi) * np.cos(kappa) - np.sin(phi) * np.sin(omega) * np.sin(kappa)
7
+ a2 = -np.cos(phi) * np.sin(kappa) - np.sin(phi) * np.sin(omega) * np.cos(kappa)
8
+ a3 = -np.sin(phi) * np.cos(omega)
9
+ b1 = np.cos(omega) * np.sin(kappa)
10
+ b2 = np.cos(omega) * np.cos(kappa)
11
+ b3 = -np.sin(omega)
12
+ c1 = np.sin(phi) * np.cos(kappa) + np.cos(phi) * np.sin(omega) * np.sin(kappa)
13
+ c2 = -np.sin(phi) * np.sin(kappa) + np.cos(phi) * np.sin(omega) * np.cos(kappa)
14
+ c3 = np.cos(phi) * np.cos(omega)
15
+ arr = np.array([[a1, a2, a3], [b1, b2, b3], [c1, c2, c3]])
16
+ return arr
17
+
18
+ def intrisinc(self,path):
19
+ path=os.path.abspath(path)
20
+ return np.loadtxt(path, delimiter=',')
21
+ def cx_cy(self,path):
22
+ ins=self.intrisinc(path)
23
+ return ins[0, 2],ins[1, 2]
24
+ def fx(self,path):
25
+ ins=self.intrisinc(path)
26
+ return ins[0,0]
@@ -0,0 +1,39 @@
1
+ import numpy as np
2
+
3
+
4
+ # 4.213158 0.669677 -3.907534 -0.750835 60 0 -60
5
+ # 内方位元素:f,x0,y0 单位mm
6
+
7
+ class FrontTool:
8
+ def coordinate(self, R, u, v, f): # 计算所求点的像空间辅助坐标系,xyz--> XYZ,R为旋转矩阵,P所求点像空间坐标,f为主距
9
+ XYZ = []
10
+ for i in range(len(u)):
11
+ xyz = np.array([[u[i]], [v[i]], [-f]])
12
+ XYZ.append(np.dot(R, xyz))
13
+ return XYZ
14
+
15
+ def projection_index(self, B, XYZ1, XYZ2): # 投影系数计算
16
+ bu = B[0]
17
+ bw = B[2]
18
+ u1 = XYZ1[0]
19
+ w1 = XYZ1[2]
20
+ u2 = XYZ2[0]
21
+ w2 = XYZ2[2]
22
+ N1 = (bu * w2 - bw * u2) / (u1 * w2 - u2 * w1)
23
+ N2 = (bu * w1 - bw * u1) / (u1 * w2 - u2 * w1)
24
+ return [N1[0], N2[0]]
25
+
26
+ def genN(self, B, XYZ1, XYZ2):
27
+ N = []
28
+ for i in range(len(XYZ1)):
29
+ N.append(self.projection_index(B, XYZ1[i], XYZ2[i]))
30
+ return N
31
+
32
+ def xyz(self, S1, XYZ1, N):
33
+ l = []
34
+ for i in range(len(XYZ1)):
35
+ XYZ = XYZ1[i].reshape((3,))
36
+ # 地面控制点坐标计算
37
+ res = S1 + N[i][0] * XYZ
38
+ l.append(res)
39
+ return np.array(l)
@@ -0,0 +1,142 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Created on Fri Apr 24 12:23:35 2020
4
+ @author: 陨星落云
5
+ """
6
+ import numpy as np
7
+ from numpy import linalg
8
+ from remote_run_everything.binocular.cam_tool import CamTool
9
+ import copy
10
+ from remote_run_everything.binocular.ba_front import BaFront
11
+
12
+
13
+ class RelativePos:
14
+ def __init__(self, pathl,pathr,unitl,unitr):
15
+ self.pathl=pathl
16
+ self.pathr=pathr
17
+ self.unitl=unitl
18
+ self.unitr=unitr
19
+ self.cam=CamTool()
20
+ self.f=self.cam.fx(self.pathl)*self.unitl
21
+ self.fi = 0
22
+ self.omega = 0
23
+ self.kapa = 0
24
+ self.u_bv = 0
25
+ self.r_bw = 0
26
+
27
+
28
+ def rel_one(self, l0, r0):
29
+ cxcyl = self.cam.cx_cy(self.pathl)
30
+ cxcyr = self.cam.cx_cy(self.pathr)
31
+ # 像素坐标换相平面坐标 输入同名像素点 [(u,v),]
32
+ l = self.uv_process(self.unitl, cxcyl[0], cxcyl[1], copy.deepcopy(l0))
33
+ r = self.uv_process(self.unitr, cxcyr[0], cxcyr[1], copy.deepcopy(r0))
34
+ # 后方交汇 改写右边-->左边的旋角,u,v,返回使用到的像素点index
35
+ new_match = self.back_intersect(l, r)
36
+ if new_match is None:
37
+ print("can not solve relative pos")
38
+ return None
39
+ a1 = [0, 0, 0]
40
+ a2 = [self.fi, self.omega, self.kapa]
41
+ S1 = np.array([0., 0., 0.])
42
+ S2 = np.array([1, self.u_bv, self.r_bw])
43
+ l = l[new_match, :]
44
+ r = r[new_match, :]
45
+ fl=self.cam.fx(self.pathl)*self.unitl
46
+ fr=self.cam.fx(self.pathr)*self.unitr
47
+ f = BaFront(fl, fr, S1, S2, a1, a2, l[:, 0], l[:, 1], r[:, 0],
48
+ r[:, 1])
49
+ # 前方交汇
50
+ pcd = f.first_cpt()
51
+ d = {"pcd": pcd, "T": S2, "angle": a2, "match": new_match
52
+ # "match": np.concatenate([i['l'][new_match, :], i['r'][new_match, :]], axis=1),
53
+ }
54
+ return d
55
+
56
+ def uv_process(self, unit, cx, cy, l):
57
+ l[:, 0] = unit * (l[:, 0] - cx)
58
+ l[:, 1] = unit * (cy - l[:, 1])
59
+ return l
60
+
61
+ def cptaq(self, i, l, r):
62
+ # 计算旋转矩阵
63
+ R = CamTool().calcR(self.fi, self.omega, self.kapa)
64
+ # 比例尺 怎么都无所谓
65
+ bu = l[0][0] - r[0][0]
66
+ bv = bu * self.u_bv
67
+ bw = bu * self.r_bw
68
+ # 左片相对摄影测量坐标
69
+ u1 = l[i][0]
70
+ v1 = l[i][1]
71
+ w1 = -self.f
72
+ # 计算相对摄影测量坐标
73
+ mr = np.dot(R, np.array([r[i][0], r[i][1], -self.f]))
74
+ # 右片相对摄影测量坐标
75
+ u2 = mr[0]
76
+ v2 = mr[1]
77
+ w2 = mr[2]
78
+ # 计算N1,N2
79
+ N1 = (bu * w2 - bw * u2) / (u1 * w2 - u2 * w1)
80
+ N2 = (bu * w1 - bw * u1) / (u1 * w2 - u2 * w1)
81
+ # 计算每个点Q
82
+ Q = N1 * v1 - N2 * v2 - bv
83
+ a = -u2 * v2 * N2 / w2
84
+ b = -N2 * (w2 + v2 * v2 / w2)
85
+ c = u2 * N2
86
+ d = bu
87
+ e = -v2 * bu / w2
88
+ return np.array([a, b, c, d, e]), Q
89
+
90
+ def back_intersect(self, l, r):
91
+ n = l.shape[0]
92
+ countx, countj = (0, 0)
93
+ # 误差方程参数
94
+ # 右片相对相空间坐标,相对摄影测量坐标
95
+ # 迭代运算
96
+ while True:
97
+ Al = []
98
+ Ll = []
99
+ new_match = []
100
+
101
+ # 计算每个点参数,组成法方程矩阵
102
+ for i in range(n):
103
+ ai, Q = self.cptaq(i, l, r)
104
+ if np.isnan(Q):
105
+ continue
106
+ new_match.append(i)
107
+ Al.append(ai)
108
+ Ll.append(Q)
109
+ # A[i, :] = ai
110
+ # L[i] = Q
111
+ # 求解X
112
+ A = np.array(Al)
113
+ L = np.array(Ll)
114
+ try:
115
+ inv = linalg.inv(np.dot(A.T, A))
116
+ except:
117
+ return None
118
+ X = np.dot(np.dot(inv, A.T), L)
119
+ # 累加五参数
120
+ self.fi += X[0]
121
+ self.omega += X[1]
122
+ self.kapa += X[2]
123
+ self.u_bv += X[3]
124
+ self.r_bw += X[4]
125
+ # 循环次数+
126
+ countx += 1
127
+ # 判断是否收敛
128
+ if countx > 1000:
129
+ return None
130
+
131
+ if (np.abs(X) < 0.00003).all():
132
+ print("五参数", self.fi, self.omega, self.kapa, self.u_bv, self.r_bw)
133
+ # 精度评定
134
+ V = np.dot(A, X.T) - L
135
+ c1 = np.sqrt(np.dot(V.T, V) / n)
136
+ print("相对定向精度:", c1)
137
+ print("相对定向迭代次数:", countx)
138
+ print("新的配对长度:", len(new_match))
139
+ return new_match
140
+
141
+
142
+
@@ -1,7 +1,5 @@
1
- import jinja2, requests, os
2
1
  import pandas as pd
3
- import base64
4
- import os, signal, glob, arrow, uuid, hashlib
2
+ import jinja2, os,base64,struct, glob, arrow, uuid, hashlib
5
3
 
6
4
 
7
5
  class Common1:
@@ -98,6 +96,27 @@ class Common1:
98
96
  hex_string = hashlib.md5(s.encode("UTF-8")).hexdigest()
99
97
  return str(uuid.UUID(hex=hex_string))
100
98
 
99
+ def ascii2hex(self,l):
100
+ tu = [i.replace("0x", "") for i in l]
101
+ tu = [self.prefix_zero(2, i) for i in tu]
102
+ return "".join(tu)
103
+
104
+ def ascii2int(self,l,big):
105
+ s=self.ascii2hex(l)
106
+ b = bytes.fromhex(s)
107
+ if big:
108
+ return int.from_bytes(b, byteorder='big')
109
+ return int.from_bytes(b, byteorder='little')
110
+
111
+ def ascii2float(self,l,big):
112
+ s=self.ascii2hex(l)
113
+ if big:
114
+ return struct.unpack('>f', bytes.fromhex(s))[0]
115
+ return struct.unpack('<f', bytes.fromhex(s))[0]
116
+
117
+
118
+
119
+
101
120
 
102
121
  if __name__ == '__main__':
103
122
  g = Common1()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remote_run_everything
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: Deploy Tools
5
5
  Author-email: Wang Qi <wangmarkqi@gmail.com>
6
6
  License-Expression: MIT
@@ -27,7 +27,7 @@ from remote_run_everything import cherrypy_in_daemon,ByHttpServer
27
27
  cherrypy_in_daemon(ByHttpServer,8888,"/deploy")
28
28
 
29
29
  # 上推代码
30
- from remote_run_everything import ByHttp
30
+ from remote_run_everything import ByHttp ,BySftp
31
31
  def test_up():
32
32
  host = "http://x.x.x.x:8888/deploy"
33
33
  local = "D://project/demand/shop"
@@ -35,6 +35,13 @@ def test_up():
35
35
  db = "D://wq/temp/shop.db"
36
36
  bh = ByHttp(host, local, remote, db)
37
37
  bh.up(['node_modules', ".pyc", ".idea"])
38
+ def test_up2():
39
+ host = "http://x.x.x.x:8888/deploy"
40
+ local = "D://project/demand/shop"
41
+ remote = "/data/mypy/shop"
42
+ db = "D://wq/temp/shop.db"
43
+ by=BySftp(host,22,'root','pwd',local,remote,db)
44
+ by.up(['node_modules', ".pyc", ".idea", ".pdf", ".docx", ".pickle", ".png", ".jpg",".venv","target","dist","build"])
38
45
 
39
46
  # 下拉代码
40
47
  def test_down():
@@ -94,6 +101,7 @@ db.drop_db()
94
101
  ```
95
102
  ## 进程管理
96
103
  ```python
104
+ import os
97
105
  class ProcessManage:
98
106
  # nosql is instance of Nosql or Nosqlmysql or Nqsqlpg
99
107
  def __init__(self, nosql):
@@ -107,3 +115,33 @@ class ProcessManage:
107
115
  self.col.insert_one(dic)
108
116
 
109
117
  ```
118
+ ## 缓存装饰器
119
+ ```python
120
+ from remote_run_everything import cache_by_1starg,cache_by_name,cache_by_rkey,cache_by_nth_arg
121
+ @cache_by_name("asdf", 1)
122
+ def test_dec():
123
+ print("运行了函数!!!!!!!!!!!!!!!!")
124
+ return {"a": "adaf"}
125
+
126
+
127
+ ```
128
+
129
+ ## 关系型 数据库
130
+ ```python
131
+ from remote_run_everything import Crud,CrudeDuck
132
+ # 详情参见类方法
133
+ ```
134
+
135
+ ## 双目测距
136
+ ```python
137
+ from remote_run_everything.binocular.relative_pos import RelativePos,CamTool
138
+ import numpy as np
139
+ unit=0.006240084611316764
140
+ l=[[3838.36767578125, 50.56350326538086], [2636.24072265625, 88.38832092285156], [511.72705078125, 95.95327758789062], [2303.57666015625, 107.30072784423828], [2159.92626953125, 111.08320617675781], [2001.15478515625, 114.86569213867188], ]
141
+ r=[[3743.86083984375, 31.651092529296875], [2424.54541015625, 65.69342803955078], [231.98681640625, 69.47590637207031], [2076.76025390625, 84.6058349609375], [1921.76904296875, 88.38832092285156], [1759.21728515625, 92.1707992553711]]
142
+ l=np.array(l)
143
+ r=np.array(r)
144
+ path="./nik_insinc.txt"
145
+ dic = RelativePos(path,path,unit,unit).rel_one(l, r)
146
+ print (dic)
147
+ ```
@@ -7,6 +7,11 @@ remote_run_everything.egg-info/PKG-INFO
7
7
  remote_run_everything.egg-info/SOURCES.txt
8
8
  remote_run_everything.egg-info/dependency_links.txt
9
9
  remote_run_everything.egg-info/top_level.txt
10
+ remote_run_everything/binocular/ba_front.py
11
+ remote_run_everything/binocular/back_tool.py
12
+ remote_run_everything/binocular/cam_tool.py
13
+ remote_run_everything/binocular/front_tool.py
14
+ remote_run_everything/binocular/relative_pos.py
10
15
  remote_run_everything/db/__init__.py
11
16
  remote_run_everything/db/backup.py
12
17
  remote_run_everything/db/crud_sqlalchemy.py
@@ -29,4 +34,5 @@ remote_run_everything/tools/decorators.py
29
34
  remote_run_everything/tools/sqlacodegen_go_struct.py
30
35
  remote_run_everything/vsconf/conf_txt.py
31
36
  remote_run_everything/vsconf/core.py
32
- test/test.py
37
+ test/test.py
38
+ test/test_binocular.py
@@ -0,0 +1,14 @@
1
+
2
+ l=[[3838.36767578125, 50.56350326538086], [2636.24072265625, 88.38832092285156], [511.72705078125, 95.95327758789062], [2303.57666015625, 107.30072784423828], [2159.92626953125, 111.08320617675781], [2001.15478515625, 114.86569213867188], [1849.94384765625, 118.6481704711914], [1596.66552734375, 122.43064880371094], [1683.61181640625, 122.43064880371094], [1528.62060546875, 126.213134765625], [1354.72802734375, 129.99562072753906], [1192.17626953125, 133.77809143066406], [1010.72314453125, 137.56057739257812], [2556.85498046875, 141.3430633544922], [840.61083984375, 145.1255340576172], [515.50732421875, 156.47299194335938], [523.06787109375, 251.03501892089844], [2553.07470703125, 262.3824768066406], [2303.57666015625, 266.1649475097656], [2152.36572265625, 269.94744873046875], [2001.15478515625, 277.51239013671875], [1846.16357421875, 281.2948913574219], [3093.65380859375, 288.8598327636719], [1691.17236328125, 292.642333984375], [1528.62060546875, 296.4248046875], [1362.28857421875, 300.207275390625], [523.06787109375, 303.9897766113281], [1192.17626953125, 307.7722473144531], [1022.06396484375, 315.33721923828125], [848.17138671875, 319.11968994140625], [526.84814453125, 334.2496337890625], [530.62841796875, 360.72698974609375], [2549.29443359375, 364.50946044921875], [3104.99462890625, 383.421875], [530.62841796875, 390.9868469238281], [1025.84423828125, 390.9868469238281], [1161.93408203125, 398.55181884765625], [1097.66943359375, 406.11676025390625], [530.62841796875, 421.2467041015625], [2152.36572265625, 436.3766174316406], [2299.79638671875, 436.3766174316406], [2001.15478515625, 447.72406005859375], [1846.16357421875, 451.5065612792969], [534.40869140625, 459.0715026855469], [1691.17236328125, 459.0715026855469], [2545.51416015625, 462.85400390625], [1528.62060546875, 466.636474609375], [1366.06884765625, 474.2014465332031], [534.40869140625, 477.9839172363281], [1199.73681640625, 485.54888916015625], [3127.67626953125, 485.54888916015625], [1029.62451171875, 489.33135986328125], [855.73193359375, 500.6788024902344], [3089.87353515625, 500.6788024902344], [538.18896484375, 512.0262451171875], [541.96923828125, 557.416015625], [541.96923828125, 576.3284301757812], [2296.01611328125, 587.6759033203125], [541.96923828125, 595.2408447265625], [2152.36572265625, 599.0233154296875], [473.92431640625, 606.5883178710938], [2001.15478515625, 606.5883178710938], [390.75830078125, 610.3707885742188], [545.74951171875, 614.1532592773438], [1846.16357421875, 614.1532592773438], [1691.17236328125, 629.283203125], [1532.40087890625, 636.84814453125], [428.56103515625, 640.630615234375], [1369.84912109375, 644.4130859375], [2859.27685546875, 644.4130859375], [549.52978515625, 651.9780883789062], [1207.29736328125, 655.7605590820312], [1037.18505859375, 663.3255004882812], [1109.01025390625, 663.3255004882812], [594.89306640625, 667.1079711914062], [383.19775390625, 670.8905029296875], [553.31005859375, 670.8905029296875], [848.17138671875, 670.8905029296875], [867.07275390625, 670.8905029296875], [655.37744140625, 674.6729736328125], [2840.37548828125, 674.6729736328125], [553.31005859375, 689.8029174804688], [2537.95361328125, 693.5853881835938], [2855.49658203125, 727.627685546875], [2537.95361328125, 731.4102172851562], [553.31005859375, 735.1926879882812], [2288.45556640625, 754.1051025390625], [557.09033203125, 757.8875732421875], [2148.58544921875, 757.8875732421875], [2001.15478515625, 765.4525146484375], [2530.39306640625, 776.7999877929688], [557.09033203125, 780.5824584960938], [1849.94384765625, 780.5824584960938], [1694.95263671875, 791.9298706054688], [2530.39306640625, 795.71240234375], [1090.10888671875, 803.27734375], [1536.18115234375, 803.27734375], [1373.62939453125, 810.84228515625], [560.87060546875, 814.624755859375], [1211.07763671875, 822.1897583007812], [2534.17333984375, 825.9722290039062], [1044.74560546875, 833.5371704101562], [560.87060546875, 844.8846435546875], [927.55712890625, 844.8846435546875], [2534.17333984375, 844.8846435546875], [874.63330078125, 848.6671142578125], [2534.17333984375, 863.7970581054688], [564.65087890625, 871.3619995117188], [1271.56201171875, 878.9269409179688], [2288.45556640625, 901.6218872070312], [564.65087890625, 909.1868286132812], [2148.58544921875, 916.7517700195312], [1997.37451171875, 928.0992431640625], [568.43115234375, 931.8817138671875], [1849.94384765625, 939.4466552734375], [1694.95263671875, 950.7941284179688], [1539.96142578125, 962.1415405273438], [568.43115234375, 969.70654296875], [1377.40966796875, 977.271484375], [572.21142578125, 988.6189575195312], [1214.85791015625, 992.4014282226562], [1048.52587890625, 999.9663696289062], [817.92919921875, 1003.7488403320312], [882.19384765625, 1015.0963134765625], [572.21142578125, 1018.8787841796875], [1600.44580078125, 1030.2261962890625], [572.21142578125, 1049.138671875], [2284.67529296875, 1060.486083984375], [2144.80517578125, 1068.051025390625], [575.99169921875, 1079.3984375], [1997.37451171875, 1083.1810302734375], [2522.83251953125, 1083.1810302734375], [1849.94384765625, 1094.5284423828125], [579.77197265625, 1098.3109130859375], [1694.95263671875, 1109.6583251953125], [1596.66552734375, 1117.2232666015625], [1543.74169921875, 1124.788330078125], [1384.97021484375, 1139.918212890625], [583.55224609375, 1151.265625], [1222.41845703125, 1151.265625], [1135.47216796875, 1158.83056640625], [1056.08642578125, 1166.3956298828125], [583.55224609375, 1173.9605712890625], [2522.83251953125, 1177.7430419921875], [889.75439453125, 1185.3079833984375], [587.33251953125, 1204.2203369140625], [2280.89501953125, 1204.2203369140625], [507.94677734375, 1215.56787109375], [780.12646484375, 1215.56787109375], [2144.80517578125, 1219.350341796875], [1997.37451171875, 1234.480224609375], [2519.05224609375, 1242.045166015625], [1849.94384765625, 1249.610107421875], [2447.22705078125, 1249.610107421875], [2413.20458984375, 1257.1751708984375], [511.72705078125, 1260.9576416015625], [1698.73291015625, 1264.7401123046875], [1634.46826171875, 1268.5225830078125], [1543.74169921875, 1279.8699951171875], [591.11279296875, 1291.2174072265625], [2261.99365234375, 1291.2174072265625], [2522.83251953125, 1291.2174072265625], [477.70458984375, 1295.0], [2239.31201171875, 1295.0], [1388.75048828125, 1298.782470703125], [2178.82763671875, 1298.782470703125], [2220.41064453125, 1298.782470703125], [2197.72900390625, 1302.56494140625], [591.11279296875, 1310.1298828125], [1226.19873046875, 1310.1298828125], [1933.10986328125, 1310.1298828125], [1997.37451171875, 1313.912353515625], [1150.59326171875, 1325.259765625], [1849.94384765625, 1325.259765625], [2129.68408203125, 1325.259765625], [1063.64697265625, 1329.042236328125], [523.06787109375, 1332.82470703125], [1993.59423828125, 1332.82470703125], [897.31494140625, 1344.1722412109375], [2133.46435546875, 1347.9547119140625], [594.89306640625, 1355.5196533203125], [3577.52880859375, 1355.5196533203125], [1694.95263671875, 1363.0845947265625], [1929.32958984375, 1363.0845947265625], [507.94677734375, 1366.8670654296875], [3626.67236328125, 1366.8670654296875], [1555.08251953125, 1370.6495361328125], [3596.43017578125, 1370.6495361328125], [3577.52880859375, 1374.4320068359375], [1460.57568359375, 1381.9970703125], [1834.82275390625, 1381.9970703125], [1392.53076171875, 1389.56201171875], [1350.94775390625, 1393.344482421875], [3577.52880859375, 1393.344482421875], [783.90673828125, 1397.126953125], [1127.91162109375, 1400.909423828125], [1229.97900390625, 1400.909423828125], [598.67333984375, 1412.2568359375], [1067.42724609375, 1412.2568359375], [1350.94775390625, 1412.2568359375], [742.32373046875, 1416.039306640625], [1388.75048828125, 1416.039306640625], [1029.62451171875, 1419.82177734375], [2738.30810546875, 1419.82177734375], [1256.44091796875, 1423.6043701171875], [1630.68798828125, 1423.6043701171875], [935.11767578125, 1431.1693115234375], [1392.53076171875, 1434.9517822265625], [2261.99365234375, 1438.7342529296875], [602.45361328125, 1442.5167236328125], [1150.59326171875, 1450.0816650390625], [1282.90283203125, 1453.8641357421875], [2080.54052734375, 1453.8641357421875], [2401.86376953125, 1457.6466064453125], [969.14013671875, 1461.4290771484375], [2420.76513671875, 1461.4290771484375], [602.45361328125, 1472.776611328125], [938.89794921875, 1472.776611328125], [1952.01123046875, 1472.776611328125], [1694.95263671875, 1476.55908203125], [2579.53662109375, 1480.341552734375], [904.87548828125, 1484.1240234375], [1313.14501953125, 1491.68896484375], [602.45361328125, 1495.471435546875], [1260.22119140625, 1499.25390625], [3668.25537109375, 1506.8189697265625], [1195.95654296875, 1510.6014404296875], [2904.64013671875, 1510.6014404296875], [606.23388671875, 1514.3839111328125], [3611.55126953125, 1514.3839111328125], [2643.80126953125, 1518.1663818359375], [1003.16259765625, 1521.9488525390625], [1078.76806640625, 1521.9488525390625], [1608.00634765625, 1521.9488525390625], [1880.18603515625, 1525.7313232421875], [2541.73388671875, 1533.2962646484375], [2783.67138671875, 1537.0787353515625], [1494.59814453125, 1540.8612060546875], [3645.57373046875, 1540.8612060546875], [3679.59619140625, 1540.8612060546875], [901.09521484375, 1544.6436767578125], [1229.97900390625, 1544.6436767578125], [3592.64990234375, 1544.6436767578125], [606.23388671875, 1548.42626953125], [3611.55126953125, 1548.42626953125], [946.45849609375, 1552.208740234375], [2254.43310546875, 1559.773681640625], [2318.69775390625, 1559.773681640625], [897.31494140625, 1563.55615234375], [916.21630859375, 1563.55615234375], [1381.18994140625, 1563.55615234375], [1653.36962890625, 1563.55615234375], [610.01416015625, 1567.338623046875], [1112.79052734375, 1567.338623046875], [2590.87744140625, 1567.338623046875], [1003.16259765625, 1574.903564453125], [1313.14501953125, 1574.903564453125], [1585.32470703125, 1574.903564453125], [2537.95361328125, 1574.903564453125], [885.97412109375, 1582.468505859375], [1536.18115234375, 1582.468505859375], [1812.14111328125, 1582.468505859375], [2488.81005859375, 1582.468505859375], [610.01416015625, 1586.2509765625], [1260.22119140625, 1586.2509765625], [2753.42919921875, 1590.033447265625], [2840.37548828125, 1590.033447265625], [1464.35595703125, 1593.8160400390625], [1415.21240234375, 1601.3809814453125], [2628.68017578125, 1605.1634521484375], [1048.52587890625, 1608.9459228515625], [1139.25244140625, 1608.9459228515625], [2258.21337890625, 1608.9459228515625], [2587.09716796875, 1608.9459228515625], [1573.98388671875, 1620.2933349609375], [2545.51416015625, 1620.2933349609375], [1294.24365234375, 1624.0758056640625], [2144.80517578125, 1624.0758056640625], [3104.99462890625, 1627.8582763671875], [1513.49951171875, 1631.6407470703125], [2428.32568359375, 1631.6407470703125], [1222.41845703125, 1635.42333984375], [1494.59814453125, 1635.42333984375], [1040.96533203125, 1639.205810546875], [2023.83642578125, 1639.205810546875], [2382.96240234375, 1639.205810546875], [1453.01513671875, 1642.98828125], [1736.53564453125, 1642.98828125], [1173.27490234375, 1646.770751953125], [2311.13720703125, 1650.55322265625], [617.57470703125, 1654.335693359375], [322.71337890625, 1658.1181640625], [916.21630859375, 1661.900634765625], [972.92041015625, 1661.900634765625], [1328.26611328125, 1661.900634765625], [1619.34716796875, 1661.900634765625], [2193.94873046875, 1669.465576171875], [617.57470703125, 1673.248046875], [2488.81005859375, 1680.8131103515625], [1487.03759765625, 1684.5955810546875], [1781.89892578125, 1684.5955810546875], [2069.19970703125, 1684.5955810546875], [1059.86669921875, 1692.1605224609375], [1630.68798828125, 1692.1605224609375], [617.57470703125, 1695.9429931640625], [1721.41455078125, 1695.9429931640625], [2371.62158203125, 1695.9429931640625], [1657.14990234375, 1703.5079345703125], [1955.79150390625, 1703.5079345703125], [704.52099609375, 1707.2904052734375], [621.35498046875, 1714.8553466796875], [2246.87255859375, 1714.8553466796875], [2965.12451171875, 1718.637939453125], [991.82177734375, 1726.202880859375], [1237.53955078125, 1726.202880859375], [1789.45947265625, 1726.202880859375], [1823.48193359375, 1726.202880859375], [621.35498046875, 1733.767822265625], [2133.46435546875, 1733.767822265625], [2424.54541015625, 1741.332763671875], [1702.51318359375, 1748.897705078125], [2001.15478515625, 1748.897705078125], [3758.98193359375, 1748.897705078125], [621.35498046875, 1752.68017578125], [2734.52783203125, 1752.68017578125], [534.40869140625, 1756.462646484375], [2307.35693359375, 1756.462646484375], [1936.89013671875, 1760.2452392578125], [3660.69482421875, 1760.2452392578125], [3033.16943359375, 1764.0277099609375], [1880.18603515625, 1771.5926513671875], [938.89794921875, 1775.3751220703125], [1570.20361328125, 1775.3751220703125], [912.43603515625, 1782.9400634765625], [1127.91162109375, 1782.9400634765625], [2923.54150390625, 1782.9400634765625], [3653.13427734375, 1782.9400634765625], [625.13525390625, 1790.5050048828125], [1744.09619140625, 1794.2874755859375], [1445.45458984375, 1798.0699462890625], [2802.57275390625, 1801.8524169921875], [3222.18310546875, 1801.8524169921875], [3278.88720703125, 1805.635009765625], [3354.49267578125, 1805.635009765625], [3645.57373046875, 1805.635009765625], [625.13525390625, 1809.41748046875], [3297.78857421875, 1809.41748046875], [1471.91650390625, 1813.199951171875], [2681.60400390625, 1816.982421875], [3328.03076171875, 1816.982421875], [1619.34716796875, 1820.764892578125], [1770.55810546875, 1820.764892578125], [1925.54931640625, 1820.764892578125], [625.13525390625, 1828.329833984375], [3089.87353515625, 1828.329833984375], [3328.03076171875, 1835.894775390625], [2995.36669921875, 1839.67724609375], [965.35986328125, 1843.459716796875], [2976.46533203125, 1843.459716796875], [628.91552734375, 1847.2423095703125], [1483.25732421875, 1847.2423095703125], [1800.80029296875, 1847.2423095703125], [398.31884765625, 1851.0247802734375], [2957.56396484375, 1851.0247802734375], [3354.49267578125, 1854.8072509765625], [2859.27685546875, 1858.5897216796875], [2878.17822265625, 1858.5897216796875], [3089.87353515625, 1858.5897216796875], [3301.56884765625, 1858.5897216796875], [3626.67236328125, 1858.5897216796875], [628.91552734375, 1866.1546630859375], [1347.16748046875, 1873.7196044921875], [2292.23583984375, 1877.5020751953125], [2844.15576171875, 1877.5020751953125], [3089.87353515625, 1877.5020751953125], [2696.72509765625, 1885.0670166015625], [2734.52783203125, 1885.0670166015625], [2753.42919921875, 1885.0670166015625], [2715.62646484375, 1888.849609375], [938.89794921875, 1892.632080078125], [2628.68017578125, 1892.632080078125], [3305.34912109375, 1896.41455078125], [1233.75927734375, 1900.197021484375], [1358.50830078125, 1903.9794921875], [1857.50439453125, 1903.9794921875], [2171.26708984375, 1903.9794921875], [2715.62646484375, 1911.54443359375], [1702.51318359375, 1915.326904296875], [2496.37060546875, 1919.109375], [1388.75048828125, 1922.891845703125], [2647.58154296875, 1926.67431640625], [345.39501953125, 1934.2393798828125], [3312.90966796875, 1934.2393798828125], [379.41748046875, 1938.0218505859375], [2371.62158203125, 1938.0218505859375], [1573.98388671875, 1949.3692626953125], [1248.88037109375, 1953.1517333984375], [2541.73388671875, 1953.1517333984375], [2613.55908203125, 1953.1517333984375], [1275.34228515625, 1956.9342041015625], [2224.19091796875, 1956.9342041015625], [734.76318359375, 1960.7166748046875], [3305.34912109375, 1960.7166748046875], [2522.83251953125, 1964.4991455078125], [2583.31689453125, 1964.4991455078125], [405.87939453125, 1968.2816162109375], [2175.04736328125, 1968.2816162109375], [2454.78759765625, 1968.2816162109375], [685.61962890625, 1972.064208984375], [2386.74267578125, 1972.064208984375], [636.47607421875, 1975.8466796875], [931.33740234375, 1975.8466796875], [2095.66162109375, 1975.8466796875], [2364.06103515625, 1975.8466796875], [3830.80712890625, 1975.8466796875], [549.52978515625, 1983.41162109375], [1301.80419921875, 1983.41162109375], [3176.81982421875, 1983.41162109375], [3354.49267578125, 1983.41162109375], [349.17529296875, 1990.9765625], [2209.06982421875, 1990.9765625], [935.11767578125, 1998.54150390625], [1952.01123046875, 1998.54150390625], [2137.24462890625, 1998.54150390625], [2341.37939453125, 1998.54150390625], [421.00048828125, 2002.323974609375], [1014.50341796875, 2002.323974609375], [360.51611328125, 2009.888916015625], [2269.55419921875, 2009.888916015625], [2186.38818359375, 2013.67138671875], [700.74072265625, 2017.4539794921875], [2114.56298828125, 2017.4539794921875], [3305.34912109375, 2017.4539794921875], [2061.63916015625, 2021.2364501953125], [3131.45654296875, 2021.2364501953125], [1377.40966796875, 2028.8013916015625], [2265.77392578125, 2028.8013916015625], [3070.97216796875, 2028.8013916015625], [640.25634765625, 2032.5838623046875], [3562.40771484375, 2032.5838623046875], [1037.18505859375, 2040.1488037109375], [1861.28466796875, 2040.1488037109375], [957.79931640625, 2043.9312744140625], [2704.28564453125, 2043.9312744140625], [3070.97216796875, 2047.7138671875], [674.27880859375, 2051.496337890625], [2152.36572265625, 2051.496337890625], [2182.60791015625, 2051.496337890625], [3320.47021484375, 2051.496337890625], [371.85693359375, 2055.27880859375], [1657.14990234375, 2055.27880859375], [1914.20849609375, 2055.27880859375], [1676.05126953125, 2059.061279296875], [2579.53662109375, 2059.061279296875], [2118.34326171875, 2062.84375], [1895.30712890625, 2066.626220703125], [723.42236328125, 2070.40869140625], [1022.06396484375, 2070.40869140625], [2447.22705078125, 2070.40869140625], [375.63720703125, 2074.191162109375], [2054.07861328125, 2077.9736328125], [3324.25048828125, 2077.9736328125], [651.59716796875, 2081.756103515625], [1853.72412109375, 2081.756103515625], [1422.77294921875, 2085.53857421875], [1902.86767578125, 2089.321044921875], [1063.64697265625, 2093.103515625], [3535.94580078125, 2093.103515625], [2050.29833984375, 2096.885986328125], [606.23388671875, 2100.66845703125], [1547.52197265625, 2104.450927734375], [738.54345703125, 2108.2333984375], [1411.43212890625, 2108.2333984375], [1906.64794921875, 2108.2333984375], [386.97802734375, 2112.015869140625], [1819.70166015625, 2112.015869140625], [2942.44287109375, 2112.015869140625], [553.31005859375, 2115.79833984375], [572.21142578125, 2115.79833984375], [2451.00732421875, 2119.580810546875], [2889.51904296875, 2127.14599609375], [3101.21435546875, 2127.14599609375], [3305.34912109375, 2127.14599609375], [749.88427734375, 2130.928466796875], [1766.77783203125, 2130.928466796875], [2825.25439453125, 2130.928466796875], [2851.71630859375, 2130.928466796875], [606.23388671875, 2134.7109375], [1400.09130859375, 2134.7109375], [1343.38720703125, 2142.27587890625], [3248.64501953125, 2142.27587890625], [402.09912109375, 2149.8408203125], [757.44482421875, 2149.8408203125], [1097.66943359375, 2149.8408203125], [1766.77783203125, 2149.8408203125], [1865.06494140625, 2149.8408203125], [3494.36279296875, 2149.8408203125], [447.46240234375, 2157.40576171875], [712.08154296875, 2157.40576171875], [3513.26416015625, 2157.40576171875], [1902.86767578125, 2161.188232421875], [636.47607421875, 2164.970703125], [504.16650390625, 2172.53564453125], [3800.56494140625, 2172.53564453125], [1347.16748046875, 2176.318115234375], [768.78564453125, 2180.1005859375], [1112.79052734375, 2180.1005859375], [1233.75927734375, 2180.1005859375], [1619.34716796875, 2183.883056640625], [919.99658203125, 2187.66552734375], [2931.10205078125, 2191.447998046875], [3165.47900390625, 2191.447998046875], [3365.83349609375, 2191.447998046875], [3694.71728515625, 2191.447998046875], [3225.96337890625, 2199.012939453125], [3301.56884765625, 2199.012939453125], [3641.79345703125, 2199.012939453125], [1131.69189453125, 2210.360595703125], [3596.43017578125, 2210.360595703125], [417.22021484375, 2214.14306640625], [787.68701171875, 2221.7080078125], [1532.40087890625, 2221.7080078125], [2303.57666015625, 2221.7080078125], [1513.49951171875, 2225.490478515625], [2435.88623046875, 2229.27294921875], [538.18896484375, 2233.055419921875], [2171.26708984375, 2233.055419921875], [3290.22802734375, 2233.055419921875], [1146.81298828125, 2236.837890625], [1475.69677734375, 2236.837890625], [1407.65185546875, 2240.620361328125], [3369.61376953125, 2240.620361328125], [1426.55322265625, 2244.40283203125], [799.02783203125, 2251.9677734375], [742.32373046875, 2255.750244140625], [3040.72998046875, 2259.53271484375], [3811.90576171875, 2263.315185546875], [1161.93408203125, 2267.09765625], [1759.21728515625, 2267.09765625], [810.36865234375, 2270.880126953125], [715.86181640625, 2278.445068359375], [439.90185546875, 2286.010009765625], [1180.83544921875, 2297.357666015625], [1755.43701171875, 2297.357666015625], [3320.47021484375, 2304.922607421875], [3278.88720703125, 2308.705078125], [3343.15185546875, 2308.705078125], [3362.05322265625, 2308.705078125], [1755.43701171875, 2316.27001953125], [451.24267578125, 2320.052490234375], [712.08154296875, 2331.39990234375], [1286.68310546875, 2331.39990234375], [3229.74365234375, 2335.182373046875], [3131.45654296875, 2346.52978515625], [3290.22802734375, 2346.52978515625], [3309.12939453125, 2346.52978515625], [2288.45556640625, 2350.312255859375], [3271.32666015625, 2350.312255859375], [1214.85791015625, 2357.877197265625], [2220.41064453125, 2357.877197265625], [3082.31298828125, 2357.877197265625], [3414.97705078125, 2357.877197265625], [462.58349609375, 2361.65966796875], [2159.92626953125, 2361.65966796875], [795.24755859375, 2369.224609375], [2904.64013671875, 2369.224609375], [1271.56201171875, 2373.007080078125], [2847.93603515625, 2373.007080078125], [3131.45654296875, 2376.789794921875], [2787.45166015625, 2384.354736328125], [2938.66259765625, 2384.354736328125], [2908.42041015625, 2388.13720703125], [470.14404296875, 2391.919677734375], [848.17138671875, 2391.919677734375], [1271.56201171875, 2395.7021484375], [3475.46142578125, 2395.7021484375], [685.61962890625, 2407.049560546875], [1010.72314453125, 2407.049560546875], [2908.42041015625, 2407.049560546875], [477.70458984375, 2418.39697265625], [2942.44287109375, 2418.39697265625], [1260.22119140625, 2425.9619140625], [3517.04443359375, 2425.9619140625], [1600.44580078125, 2433.52685546875], [485.26513671875, 2437.309326171875], [2643.80126953125, 2437.309326171875], [3214.62255859375, 2441.091796875], [3535.94580078125, 2441.091796875], [1422.77294921875, 2448.65673828125], [1539.96142578125, 2448.65673828125], [1880.18603515625, 2448.65673828125], [2587.09716796875, 2448.65673828125], [2779.89111328125, 2448.65673828125], [2530.39306640625, 2452.439208984375], [3558.62744140625, 2456.2216796875], [2466.12841796875, 2460.00439453125], [492.82568359375, 2467.5693359375], [2405.64404296875, 2467.5693359375], [2364.06103515625, 2475.13427734375], [1112.79052734375, 2478.916748046875], [2541.73388671875, 2478.916748046875], [3052.07080078125, 2478.916748046875], [2311.13720703125, 2482.69921875], [496.60595703125, 2486.481689453125], [2292.23583984375, 2486.481689453125], [2265.77392578125, 2490.26416015625], [2587.09716796875, 2490.26416015625], [976.70068359375, 2501.611572265625], [2175.04736328125, 2501.611572265625], [2209.06982421875, 2501.611572265625], [504.16650390625, 2505.39404296875], [2156.14599609375, 2505.39404296875], [2708.06591796875, 2509.176513671875], [802.80810546875, 2516.741455078125], [3641.79345703125, 2516.741455078125], [1388.75048828125, 2528.0888671875], [2016.27587890625, 2528.0888671875], [515.50732421875, 2539.436279296875], [2330.03857421875, 2539.436279296875], [837.0, 141.0], [1023.0, 315.0], [1200.0, 483.0], [1372.0, 646.0], [1535.0, 800.0], [1694.0, 952.0], [1189.0, 133.0], [856.0, 500.0], [2307.0, 106.0], [1406.0, 2132.0]]
3
+
4
+ r=[[3743.86083984375, 31.651092529296875], [2424.54541015625, 65.69342803955078], [231.98681640625, 69.47590637207031], [2076.76025390625, 84.6058349609375], [1921.76904296875, 88.38832092285156], [1759.21728515625, 92.1707992553711], [1596.66552734375, 95.95327758789062], [1324.48583984375, 99.73576354980469], [1426.55322265625, 99.73576354980469], [1264.00146484375, 103.51824188232422], [1090.10888671875, 103.51824188232422], [916.21630859375, 107.30072784423828], [734.76318359375, 111.08320617675781], [2345.15966796875, 114.86569213867188], [557.09033203125, 114.86569213867188], [239.54736328125, 129.99562072753906], [243.32763671875, 209.427734375], [2341.37939453125, 243.47006225585938], [2072.97998046875, 247.25254821777344], [1921.76904296875, 251.03501892089844], [1762.99755859375, 258.5999755859375], [1600.44580078125, 262.3824768066406], [2927.32177734375, 273.72991943359375], [1434.11376953125, 269.94744873046875], [1267.78173828125, 269.94744873046875], [1097.66943359375, 277.51239013671875], [250.88818359375, 273.72991943359375], [923.77685546875, 281.2948913574219], [746.10400390625, 288.8598327636719], [568.43115234375, 288.8598327636719], [250.88818359375, 311.5547180175781], [254.66845703125, 341.8145751953125], [2341.37939453125, 326.6846618652344], [2934.88232421875, 375.8569030761719], [254.66845703125, 360.72698974609375], [757.44482421875, 356.94451904296875], [893.53466796875, 372.0744323730469], [829.27001953125, 375.8569030761719], [258.44873046875, 390.9868469238281], [1921.76904296875, 421.2467041015625], [2072.97998046875, 417.4642028808594], [1762.99755859375, 425.0291748046875], [1604.22607421875, 432.5941467285156], [262.22900390625, 421.2467041015625], [1437.89404296875, 436.3766174316406], [2337.59912109375, 432.5941467285156], [1275.34228515625, 443.94158935546875], [1105.22998046875, 451.5065612792969], [262.22900390625, 451.5065612792969], [931.33740234375, 455.2890319824219], [2972.68505859375, 481.7663879394531], [757.44482421875, 462.85400390625], [583.55224609375, 474.2014465332031], [2938.66259765625, 496.8963317871094], [266.00927734375, 481.7663879394531], [269.78955078125, 523.3737182617188], [269.78955078125, 542.2861328125], [2072.97998046875, 572.5459594726562], [273.56982421875, 561.198486328125], [1921.76904296875, 580.1109008789062], [197.96435546875, 576.3284301757812], [1766.77783203125, 587.6759033203125], [118.57861328125, 576.3284301757812], [273.56982421875, 587.6759033203125], [1608.00634765625, 599.0233154296875], [1441.67431640625, 606.5883178710938], [1275.34228515625, 610.3707885742188], [152.60107421875, 610.3707885742188], [1112.79052734375, 621.7182006835938], [2674.04345703125, 640.630615234375], [277.35009765625, 617.9357299804688], [942.67822265625, 629.283203125], [768.78564453125, 636.84814453125], [844.39111328125, 633.065673828125], [322.71337890625, 636.84814453125], [114.79833984375, 629.283203125], [281.13037109375, 636.84814453125], [575.99169921875, 640.630615234375], [594.89306640625, 640.630615234375], [379.41748046875, 640.630615234375], [2655.14208984375, 678.4554443359375], [281.13037109375, 655.7605590820312], [2333.81884765625, 701.1503295898438], [2670.26318359375, 720.062744140625], [2330.03857421875, 727.627685546875], [284.91064453125, 704.9328002929688], [2072.97998046875, 738.9751586914062], [284.91064453125, 727.627685546875], [1921.76904296875, 742.7576293945312], [1766.77783203125, 750.3225708007812], [2330.03857421875, 765.4525146484375], [288.69091796875, 746.5401000976562], [1608.00634765625, 761.6700439453125], [1449.23486328125, 769.2349853515625], [2330.03857421875, 795.71240234375], [825.48974609375, 776.7999877929688], [1286.68310546875, 780.5824584960938], [1116.57080078125, 784.3649291992188], [288.69091796875, 784.3649291992188], [950.23876953125, 795.71240234375], [2330.03857421875, 814.624755859375], [776.34619140625, 807.059814453125], [292.47119140625, 829.7546997070312], [655.37744140625, 814.624755859375], [2330.03857421875, 833.5371704101562], [606.23388671875, 818.4072875976562], [2330.03857421875, 852.4495849609375], [292.47119140625, 848.6671142578125], [1010.72314453125, 852.4495849609375], [2072.97998046875, 890.2744140625], [296.25146484375, 871.3619995117188], [1921.76904296875, 901.6218872070312], [1766.77783203125, 912.9692993164062], [300.03173828125, 890.2744140625], [1611.78662109375, 920.5342407226562], [1453.01513671875, 931.8817138671875], [1290.46337890625, 939.4466552734375], [300.03173828125, 931.8817138671875], [1124.13134765625, 950.7941284179688], [303.81201171875, 950.7941284179688], [957.79931640625, 962.1415405273438], [787.68701171875, 973.489013671875], [549.52978515625, 969.70654296875], [617.57470703125, 981.053955078125], [307.59228515625, 969.70654296875], [1350.94775390625, 1007.5313720703125], [307.59228515625, 999.9663696289062], [2069.19970703125, 1052.921142578125], [1921.76904296875, 1056.70361328125], [311.37255859375, 1030.2261962890625], [1770.55810546875, 1068.051025390625], [2326.25830078125, 1086.9635009765625], [1615.56689453125, 1079.3984375], [311.37255859375, 1060.486083984375], [1456.79541015625, 1090.7459716796875], [1358.50830078125, 1098.3109130859375], [1294.24365234375, 1102.0933837890625], [1131.69189453125, 1113.4407958984375], [318.93310546875, 1117.2232666015625], [965.35986328125, 1124.788330078125], [870.85302734375, 1132.353271484375], [795.24755859375, 1136.1357421875], [318.93310546875, 1147.483154296875], [2322.47802734375, 1189.0904541015625], [628.91552734375, 1151.265625], [322.71337890625, 1181.5255126953125], [2069.19970703125, 1196.6553955078125], [247.10791015625, 1177.7430419921875], [511.72705078125, 1181.5255126953125], [1921.76904296875, 1211.785400390625], [1770.55810546875, 1223.1328125], [2322.47802734375, 1242.045166015625], [1615.56689453125, 1234.480224609375], [2254.43310546875, 1249.610107421875], [2209.06982421875, 1257.1751708984375], [247.10791015625, 1219.350341796875], [1460.57568359375, 1245.82763671875], [1392.53076171875, 1253.3927001953125], [1301.80419921875, 1260.9576416015625], [330.27392578125, 1249.610107421875], [2046.51806640625, 1279.8699951171875], [2322.47802734375, 1283.6524658203125], [220.64599609375, 1253.3927001953125], [2023.83642578125, 1279.8699951171875], [1139.25244140625, 1272.3050537109375], [1944.45068359375, 1291.2174072265625], [2001.15478515625, 1279.8699951171875], [1963.35205078125, 1295.0], [330.27392578125, 1272.3050537109375], [972.92041015625, 1283.6524658203125], [1706.29345703125, 1287.4349365234375], [1774.33837890625, 1306.347412109375], [878.41357421875, 1295.0], [1619.34716796875, 1306.347412109375], [1902.86767578125, 1302.56494140625], [806.58837890625, 1298.782470703125], [266.00927734375, 1295.0], [1755.43701171875, 1313.912353515625], [636.47607421875, 1310.1298828125], [1887.74658203125, 1332.82470703125], [334.05419921875, 1321.477294921875], [3467.90087890625, 1366.8670654296875], [1453.01513671875, 1344.1722412109375], [1676.05126953125, 1347.9547119140625], [247.10791015625, 1325.259765625], [3513.26416015625, 1385.779541015625], [1309.36474609375, 1347.9547119140625], [3483.02197265625, 1400.909423828125], [3464.12060546875, 1404.69189453125], [1207.29736328125, 1359.3021240234375], [1570.20361328125, 1363.0845947265625], [1143.03271484375, 1363.0845947265625], [1097.66943359375, 1366.8670654296875], [3464.12060546875, 1423.6043701171875], [526.84814453125, 1363.0845947265625], [867.07275390625, 1370.6495361328125], [976.70068359375, 1374.4320068359375], [337.83447265625, 1363.0845947265625], [810.36865234375, 1378.214599609375], [1097.66943359375, 1385.779541015625], [481.48486328125, 1378.214599609375], [1124.13134765625, 1393.344482421875], [757.44482421875, 1385.779541015625], [2481.24951171875, 1416.039306640625], [988.04150390625, 1397.126953125], [1358.50830078125, 1400.909423828125], [666.71826171875, 1397.126953125], [1120.35107421875, 1412.2568359375], [1986.03369140625, 1427.3868408203125], [341.61474609375, 1393.344482421875], [878.41357421875, 1419.82177734375], [1006.94287109375, 1423.6043701171875], [1785.67919921875, 1438.7342529296875], [2118.34326171875, 1446.2991943359375], [681.83935546875, 1423.6043701171875], [2137.24462890625, 1450.0816650390625], [341.61474609375, 1423.6043701171875], [670.49853515625, 1442.5167236328125], [1653.36962890625, 1457.6466064453125], [1403.87158203125, 1461.4290771484375], [2288.45556640625, 1472.776611328125], [632.69580078125, 1450.0816650390625], [1022.06396484375, 1461.4290771484375], [345.39501953125, 1453.8641357421875], [980.48095703125, 1468.994140625], [3566.18798828125, 1552.208740234375], [901.09521484375, 1476.55908203125], [2628.68017578125, 1518.1663818359375], [345.39501953125, 1484.1240234375], [3501.92333984375, 1559.773681640625], [2341.37939453125, 1514.3839111328125], [704.52099609375, 1484.1240234375], [783.90673828125, 1484.1240234375], [1298.02392578125, 1499.25390625], [1566.42333984375, 1503.036376953125], [2227.97119140625, 1521.9488525390625], [2473.68896484375, 1537.0787353515625], [1180.83544921875, 1514.3839111328125], [3528.38525390625, 1571.12109375], [3585.08935546875, 1571.12109375], [625.13525390625, 1503.036376953125], [919.99658203125, 1514.3839111328125], [3479.24169921875, 1574.903564453125], [349.17529296875, 1506.8189697265625], [3498.14306640625, 1578.68603515625], [659.15771484375, 1514.3839111328125], [1929.32958984375, 1548.42626953125], [1989.81396484375, 1544.6436767578125], [606.23388671875, 1525.7313232421875], [628.91552734375, 1533.2962646484375], [1059.86669921875, 1533.2962646484375], [1328.26611328125, 1540.8612060546875], [349.17529296875, 1525.7313232421875], [799.02783203125, 1529.5137939453125], [2265.77392578125, 1559.773681640625], [689.39990234375, 1537.0787353515625], [999.38232421875, 1540.8612060546875], [1256.44091796875, 1544.6436767578125], [2201.50927734375, 1567.338623046875], [602.45361328125, 1548.42626953125], [1203.51708984375, 1552.208740234375], [1475.69677734375, 1559.773681640625], [2156.14599609375, 1571.12109375], [352.95556640625, 1544.6436767578125], [938.89794921875, 1552.208740234375], [2424.54541015625, 1586.2509765625], [2511.49169921875, 1586.2509765625], [1120.35107421875, 1563.55615234375], [1078.76806640625, 1571.12109375], [2299.79638671875, 1593.8160400390625], [727.20263671875, 1571.12109375], [810.36865234375, 1571.12109375], [1906.64794921875, 1593.8160400390625], [2269.55419921875, 1601.3809814453125], [1226.19873046875, 1590.033447265625], [2193.94873046875, 1612.7283935546875], [950.23876953125, 1590.033447265625], [1785.67919921875, 1608.9459228515625], [2802.57275390625, 1646.770751953125], [1180.83544921875, 1601.3809814453125], [2069.19970703125, 1620.2933349609375], [878.41357421875, 1601.3809814453125], [1146.81298828125, 1605.1634521484375], [712.08154296875, 1597.5985107421875], [1660.93017578125, 1616.5108642578125], [2023.83642578125, 1624.0758056640625], [1101.44970703125, 1608.9459228515625], [1377.40966796875, 1616.5108642578125], [829.27001953125, 1608.9459228515625], [1944.45068359375, 1635.42333984375], [356.73583984375, 1605.1634521484375], [65.65478515625, 1616.5108642578125], [659.15771484375, 1627.8582763671875], [689.39990234375, 1627.8582763671875], [972.92041015625, 1627.8582763671875], [1252.66064453125, 1631.6407470703125], [1819.70166015625, 1650.55322265625], [356.73583984375, 1627.8582763671875], [2114.56298828125, 1665.68310546875], [1124.13134765625, 1654.335693359375], [1407.65185546875, 1658.1181640625], [1694.95263671875, 1665.68310546875], [708.30126953125, 1646.770751953125], [1260.22119140625, 1654.335693359375], [360.51611328125, 1654.335693359375], [1354.72802734375, 1665.68310546875], [1989.81396484375, 1680.8131103515625], [1275.34228515625, 1677.0306396484375], [1570.20361328125, 1680.8131103515625], [447.46240234375, 1665.68310546875], [364.29638671875, 1673.248046875], [1861.28466796875, 1695.9429931640625], [2587.09716796875, 1718.637939453125], [700.74072265625, 1695.9429931640625], [855.73193359375, 1692.1605224609375], [1403.87158203125, 1692.1605224609375], [1430.33349609375, 1699.7254638671875], [364.29638671875, 1692.1605224609375], [1732.75537109375, 1711.0728759765625], [2027.61669921875, 1726.202880859375], [1301.80419921875, 1718.637939453125], [1600.44580078125, 1729.9853515625], [3596.43017578125, 1782.9400634765625], [364.29638671875, 1711.0728759765625], [2333.81884765625, 1745.115234375], [269.78955078125, 1711.0728759765625], [1902.86767578125, 1737.55029296875], [1543.74169921875, 1737.55029296875], [3494.36279296875, 1790.5050048828125], [2640.02099609375, 1764.0277099609375], [1471.91650390625, 1745.115234375], [696.96044921875, 1733.767822265625], [1169.49462890625, 1737.55029296875], [659.15771484375, 1745.115234375], [753.66455078125, 1737.55029296875], [2519.05224609375, 1779.1575927734375], [3475.46142578125, 1805.635009765625], [368.07666015625, 1741.332763671875], [1324.48583984375, 1764.0277099609375], [1029.62451171875, 1760.2452392578125], [2390.52294921875, 1794.2874755859375], [2813.91357421875, 1805.635009765625], [2874.39794921875, 1813.199951171875], [2965.12451171875, 1805.635009765625], [3460.34033203125, 1835.894775390625], [368.07666015625, 1767.8101806640625], [2893.29931640625, 1813.199951171875], [1044.74560546875, 1782.9400634765625], [2258.21337890625, 1805.635009765625], [2927.32177734375, 1820.764892578125], [1192.17626953125, 1786.7225341796875], [1350.94775390625, 1782.9400634765625], [1498.37841796875, 1794.2874755859375], [371.85693359375, 1786.7225341796875], [2658.92236328125, 1828.329833984375], [2927.32177734375, 1839.67724609375], [2568.19580078125, 1835.894775390625], [700.74072265625, 1805.635009765625], [2549.29443359375, 1839.67724609375], [375.63720703125, 1809.41748046875], [1052.30615234375, 1813.199951171875], [1366.06884765625, 1816.982421875], [145.04052734375, 1801.8524169921875], [2530.39306640625, 1854.8072509765625], [2965.12451171875, 1858.5897216796875], [2420.76513671875, 1851.0247802734375], [2451.00732421875, 1854.8072509765625], [2666.48291015625, 1858.5897216796875], [2897.07958984375, 1866.1546630859375], [3422.53759765625, 1888.849609375], [375.63720703125, 1828.329833984375], [916.21630859375, 1828.329833984375], [1838.60302734375, 1854.8072509765625], [2405.64404296875, 1869.9371337890625], [2674.04345703125, 1877.5020751953125], [2239.31201171875, 1881.2845458984375], [2280.89501953125, 1873.7196044921875], [2311.13720703125, 1877.5020751953125], [2261.99365234375, 1877.5020751953125], [644.03662109375, 1843.459716796875], [2182.60791015625, 1885.0670166015625], [2900.85986328125, 1907.761962890625], [799.02783203125, 1851.0247802734375], [916.21630859375, 1862.3721923828125], [1407.65185546875, 1881.2845458984375], [1706.29345703125, 1877.5020751953125], [2258.21337890625, 1907.761962890625], [1237.53955078125, 1881.2845458984375], [2027.61669921875, 1903.9794921875], [935.11767578125, 1885.0670166015625], [2190.16845703125, 1922.891845703125], [88.33642578125, 1881.2845458984375], [2912.20068359375, 1941.8043212890625], [122.35888671875, 1888.849609375], [1906.64794921875, 1919.109375], [1093.88916015625, 1907.761962890625], [802.80810546875, 1919.109375], [2084.32080078125, 1945.5867919921875], [2152.36572265625, 1945.5867919921875], [821.70947265625, 1919.109375], [1736.53564453125, 1934.2393798828125], [485.26513671875, 1919.109375], [2904.64013671875, 1979.629150390625], [2050.29833984375, 1953.1517333984375], [2122.12353515625, 1956.9342041015625], [152.60107421875, 1922.891845703125], [1679.83154296875, 1934.2393798828125], [1970.91259765625, 1960.7166748046875], [436.12158203125, 1926.67431640625], [1914.20849609375, 1960.7166748046875], [383.19775390625, 1930.4569091796875], [636.47607421875, 1945.5867919921875], [1604.22607421875, 1945.5867919921875], [1872.62548828125, 1956.9342041015625], [3607.77099609375, 2013.67138671875], [292.47119140625, 1938.0218505859375], [836.83056640625, 1945.5867919921875], [2764.77001953125, 1990.9765625], [2976.46533203125, 1998.54150390625], [95.89697265625, 1934.2393798828125], [1721.41455078125, 1972.064208984375], [636.47607421875, 1964.4991455078125], [1453.01513671875, 1975.8466796875], [1642.02880859375, 1987.194091796875], [1865.06494140625, 1983.41162109375], [167.72216796875, 1949.3692626953125], [730.98291015625, 1972.064208984375], [99.67724609375, 1953.1517333984375], [1789.45947265625, 1994.759033203125], [1687.39208984375, 1983.41162109375], [432.34130859375, 1972.064208984375], [1608.00634765625, 1990.9765625], [2908.42041015625, 2032.5838623046875], [1566.42333984375, 1987.194091796875], [2715.62646484375, 2028.8013916015625], [885.97412109375, 1979.629150390625], [1770.55810546875, 2006.1064453125], [2662.70263671875, 2036.3663330078125], [364.29638671875, 1983.41162109375], [3301.56884765625, 2059.061279296875], [738.54345703125, 1998.54150390625], [1358.50830078125, 1994.759033203125], [659.15771484375, 2002.323974609375], [2250.65283203125, 2032.5838623046875], [2662.70263671875, 2055.27880859375], [390.75830078125, 2006.1064453125], [1653.36962890625, 2032.5838623046875], [1691.17236328125, 2032.5838623046875], [2931.10205078125, 2066.626220703125], [99.67724609375, 1994.759033203125], [1146.81298828125, 2021.2364501953125], [1407.65185546875, 2025.0189208984375], [1165.71435546875, 2028.8013916015625], [2114.56298828125, 2043.9312744140625], [1630.68798828125, 2040.1488037109375], [1377.40966796875, 2032.5838623046875], [439.90185546875, 2028.8013916015625], [723.42236328125, 2032.5838623046875], [1978.47314453125, 2051.496337890625], [103.45751953125, 2017.4539794921875], [1570.20361328125, 2062.84375], [2931.10205078125, 2085.53857421875], [371.85693359375, 2032.5838623046875], [1343.38720703125, 2040.1488037109375], [908.65576171875, 2040.1488037109375], [1388.75048828125, 2066.626220703125], [772.56591796875, 2055.27880859375], [3259.98583984375, 2123.363525390625], [1551.30224609375, 2066.626220703125], [311.37255859375, 2055.27880859375], [1010.72314453125, 2070.40869140625], [443.68212890625, 2066.626220703125], [889.75439453125, 2055.27880859375], [1392.53076171875, 2085.53857421875], [103.45751953125, 2047.7138671875], [1309.36474609375, 2081.756103515625], [2507.71142578125, 2108.2333984375], [273.56982421875, 2055.27880859375], [292.47119140625, 2059.061279296875], [1982.25341796875, 2112.015869140625], [2454.78759765625, 2130.928466796875], [2689.16455078125, 2138.493408203125], [2912.20068359375, 2142.27587890625], [447.46240234375, 2085.53857421875], [1248.88037109375, 2100.66845703125], [2394.30322265625, 2127.14599609375], [2416.98486328125, 2127.14599609375], [292.47119140625, 2077.9736328125], [878.41357421875, 2100.66845703125], [833.05029296875, 2093.103515625], [2855.49658203125, 2153.623291015625], [99.67724609375, 2093.103515625], [447.46240234375, 2108.2333984375], [791.46728515625, 2104.450927734375], [1252.66064453125, 2119.580810546875], [1328.26611328125, 2127.14599609375], [3191.94091796875, 2180.1005859375], [145.04052734375, 2100.66845703125], [402.09912109375, 2108.2333984375], [3210.84228515625, 2183.883056640625], [1384.97021484375, 2142.27587890625], [322.71337890625, 2115.79833984375], [201.74462890625, 2119.580810546875], [3505.70361328125, 2210.360595703125], [855.73193359375, 2138.493408203125], [447.46240234375, 2134.7109375], [776.34619140625, 2149.8408203125], [802.80810546875, 2138.493408203125], [1082.54833984375, 2149.8408203125], [594.89306640625, 2149.8408203125], [2503.93115234375, 2191.447998046875], [2760.98974609375, 2206.578125], [2991.58642578125, 2210.360595703125], [3388.51513671875, 2225.490478515625], [2832.81494140625, 2214.14306640625], [2912.20068359375, 2214.14306640625], [3328.03076171875, 2233.055419921875], [783.90673828125, 2172.53564453125], [3282.66748046875, 2240.620361328125], [99.67724609375, 2153.623291015625], [451.24267578125, 2172.53564453125], [988.04150390625, 2187.66552734375], [1823.48193359375, 2202.79541015625], [969.14013671875, 2191.447998046875], [1970.91259765625, 2225.490478515625], [224.42626953125, 2176.318115234375], [1687.39208984375, 2214.14306640625], [2900.85986328125, 2244.40283203125], [791.46728515625, 2210.360595703125], [950.23876953125, 2199.012939453125], [882.19384765625, 2206.578125], [2999.14697265625, 2270.880126953125], [908.65576171875, 2202.79541015625], [451.24267578125, 2195.23046875], [402.09912109375, 2202.79541015625], [2628.68017578125, 2267.09765625], [3486.80224609375, 2297.357666015625], [795.24755859375, 2233.055419921875], [1248.88037109375, 2244.40283203125], [462.58349609375, 2221.7080078125], [360.51611328125, 2221.7080078125], [95.89697265625, 2214.14306640625], [802.80810546875, 2267.09765625], [1245.10009765625, 2274.66259765625], [2942.44287109375, 2327.617431640625], [2893.29931640625, 2327.617431640625], [2980.24560546875, 2323.8349609375], [2999.14697265625, 2327.617431640625], [1245.10009765625, 2293.5751953125], [92.11669921875, 2255.750244140625], [349.17529296875, 2274.66259765625], [840.61083984375, 2297.357666015625], [2832.81494140625, 2346.52978515625], [2730.74755859375, 2357.877197265625], [2900.85986328125, 2369.224609375], [2927.32177734375, 2369.224609375], [1812.14111328125, 2331.39990234375], [2881.95849609375, 2373.007080078125], [814.14892578125, 2308.705078125], [1755.43701171875, 2335.182373046875], [2681.60400390625, 2369.224609375], [3055.85107421875, 2388.13720703125], [95.89697265625, 2297.357666015625], [1676.05126953125, 2342.747314453125], [409.65966796875, 2320.052490234375], [2481.24951171875, 2373.007080078125], [829.27001953125, 2327.617431640625], [2420.76513671875, 2373.007080078125], [2734.52783203125, 2395.7021484375], [2356.50048828125, 2388.13720703125], [2522.83251953125, 2384.354736328125], [2503.93115234375, 2399.484619140625], [92.11669921875, 2316.27001953125], [462.58349609375, 2327.617431640625], [836.83056640625, 2361.65966796875], [3086.09326171875, 2414.614501953125], [292.47119140625, 2350.312255859375], [606.23388671875, 2357.877197265625], [2485.02978515625, 2407.049560546875], [92.11669921875, 2354.0947265625], [2526.61279296875, 2425.9619140625], [844.39111328125, 2391.919677734375], [3127.67626953125, 2452.439208984375], [1074.98779296875, 2391.919677734375], [92.11669921875, 2373.007080078125], [2205.28955078125, 2429.744384765625], [2825.25439453125, 2460.00439453125], [3142.79736328125, 2471.351806640625], [901.09521484375, 2399.484619140625], [1022.06396484375, 2395.7021484375], [1373.62939453125, 2418.39697265625], [2141.02490234375, 2444.874267578125], [2356.50048828125, 2448.65673828125], [2080.54052734375, 2441.091796875], [3161.69873046875, 2486.481689453125], [2016.27587890625, 2444.874267578125], [92.11669921875, 2407.049560546875], [1948.23095703125, 2456.2216796875], [1906.64794921875, 2460.00439453125], [693.18017578125, 2429.744384765625], [2088.10107421875, 2478.916748046875], [2628.68017578125, 2486.481689453125], [1838.60302734375, 2471.351806640625], [88.33642578125, 2425.9619140625], [1812.14111328125, 2475.13427734375], [1793.23974609375, 2478.916748046875], [2144.80517578125, 2490.26416015625], [545.74951171875, 2441.091796875], [1691.17236328125, 2490.26416015625], [1728.97509765625, 2482.69921875], [88.33642578125, 2444.874267578125], [1672.27099609375, 2490.26416015625], [2292.23583984375, 2509.176513671875], [356.73583984375, 2452.439208984375], [3222.18310546875, 2539.436279296875], [867.07275390625, 2482.69921875], [1532.40087890625, 2512.958984375], [88.33642578125, 2475.13427734375], [1872.62548828125, 2531.871337890625], [558.0, 115.0], [751.0, 289.0], [932.0, 457.0], [1112.0, 620.0], [1285.0, 778.0], [1451.0, 930.0], [917.0, 107.0], [583.0, 472.0], [2078.0, 83.0], [872.0, 2091.0]]
5
+
6
+ from remote_run_everything.binocular.relative_pos import RelativePos,CamTool
7
+ import numpy as np
8
+
9
+ unit=0.006240084611316764
10
+ l=np.array(l)
11
+ r=np.array(r)
12
+ path="./nik_insinc.txt"
13
+ dic = RelativePos(path,path,unit,unit).rel_one(l, r)
14
+ print (dic)