(step, depth, K, f, cx, cy, x_res, y_res)
| 56 | return K |
| 57 | |
| 58 | def generate_sampling_frustum(step, depth, K, f, cx, cy, x_res, y_res): |
| 59 | #pdb.set_trace() |
| 60 | x_max = depth * (x_res - cx) / f |
| 61 | x_min = -depth * cx / f |
| 62 | y_max = depth * (y_res - cy) / f |
| 63 | y_min = -depth * cy / f |
| 64 | |
| 65 | zs = np.arange(0, depth, step) |
| 66 | xs = np.arange(x_min, x_max, step) |
| 67 | ys = np.arange(y_min, y_max, step) |
| 68 | |
| 69 | X0 = [] |
| 70 | for z in zs: |
| 71 | for x in xs: |
| 72 | for y in ys: |
| 73 | P = np.array([x, y, z]) |
| 74 | p = np.dot(K, P) |
| 75 | if p[2] < 0.00001: |
| 76 | continue |
| 77 | p = p / p[2] |
| 78 | if is_inside_frustum(p, x_res, y_res): |
| 79 | X0.append(P) |
| 80 | X0 = np.array(X0) |
| 81 | return X0 |
| 82 | |
| 83 | def compute_frustums_overlap(pose0, pose1, sampling_frustum, K, x_res, y_res): |
| 84 | R0 = pose0[0:3, 0:3] |
nothing calls this directly
no test coverage detected