Skip to content

Commit

Permalink
refactor: mv ct.stat->ct.normalize, rm ct.plot
Browse files Browse the repository at this point in the history
  • Loading branch information
yxlao committed Oct 22, 2023
1 parent 41bdf26 commit cb0c7b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 186 deletions.
11 changes: 11 additions & 0 deletions camtools/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,14 @@ def compute_normalize_mat(points):
s_mat[3, 3] = 1

return s_mat @ t_mat


def report_points_range(points):
points_center = points.mean(axis=0)
points_radii_wrt_center = np.linalg.norm(points - points_center, axis=1)
points_radii_wrt_origin = np.linalg.norm(points, axis=1)

print(f"center : {points_center}")
print(f"radius w.r.t center: {points_radii_wrt_center.max()}")
print(f"radius w.r.t origin: {points_radii_wrt_origin.max()}")
print(f"range : {points.min(axis=0)} to {points.max(axis=0)}")
174 changes: 0 additions & 174 deletions camtools/plot.py

This file was deleted.

12 changes: 0 additions & 12 deletions camtools/stat.py

This file was deleted.

0 comments on commit cb0c7b4

Please sign in to comment.