This commit is contained in:
gdamms 2023-01-30 10:26:06 +01:00
parent 705b610d68
commit 6e9d74759a

View file

@ -10,12 +10,12 @@ from rich.progress import track
from borders import update_border
from fvi import fast_voxel_intersect
VOXEL_SIZE = 5e-3
X_MIN, X_MAX = 0.7, 1.3
Y_MIN, Y_MAX = -0.05, 0.05
Z_MIN, Z_MAX = -0.05, 0.05
VOXEL_SIZE = 5e-2
X_MIN, X_MAX = -1.2, 1.2
Y_MIN, Y_MAX = -1.2, 1.2
Z_MIN, Z_MAX = -1.2, 1.2
nb_frame = 24
nb_frame = 25
points = np.array(
[
@ -35,10 +35,10 @@ proj_mats = []
frames = []
for k in range(nb_frame):
frame = cv2.imread(f"data/torus/masks/Image{k:04}.png", cv2.IMREAD_GRAYSCALE)
frames.append(cv2.imread(f"data/torus/images/Image{k:04}.png", cv2.IMREAD_GRAYSCALE))
frame = cv2.imread(f"data/cuby/masks/Image{k:04}.png", cv2.IMREAD_GRAYSCALE)
frames.append(cv2.imread(f"data/cuby/images/Image{k:04}.png", cv2.IMREAD_GRAYSCALE))
with open(f"data/torus/cameras/{k:04d}.pickle", "rb") as file:
with open(f"data/cuby/cameras/{k:04d}.pickle", "rb") as file:
matrices = pickle.load(file)
proj_mat = matrices["P"]
proj_mats.append(proj_mat)
@ -69,9 +69,9 @@ for k in range(nb_frame):
# cv2.circle(frame, (cam_point[0], cam_point[1]), 2, (255, 0, 255))
# for k in range(nb_frame):
# frame = cv2.imread(f'/tmp/masks/Image{k:04}.png')
# frame = cv2.imread(f'data/cuby/masks/Image{k:04}.png')
# with open(f"/tmp/cameras/{k:04d}.pickle", 'rb') as file:
# with open(f"data/cuby/cameras/{k:04d}.pickle", 'rb') as file:
# proj_mat = pickle.load(file)["P"]
# cam_points = proj_mat @ points.T