From a99cd526fbba39db5b129f77b25d2ebad959023d Mon Sep 17 00:00:00 2001 From: Emanuele Giacomini Date: Tue, 30 Jul 2024 10:29:54 +0200 Subject: [PATCH] Removed hard dependency on pybind11's submodule, removed time import --- CMakeLists.txt | 5 +++-- pyprojections/camera.py | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59073b2..04d5e95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,9 @@ FetchContent_MakeAvailable(Eigen) find_package(OpenMP) -# find_package(pybind11 CONFIG REQUIRED) -add_subdirectory(extern/pybind11) +find_package(pybind11 CONFIG REQUIRED) + +# add_subdirectory(extern/pybind11) add_library(core INTERFACE) target_include_directories(core INTERFACE src) target_link_libraries(core INTERFACE Eigen3::Eigen OpenMP::OpenMP_CXX) diff --git a/pyprojections/camera.py b/pyprojections/camera.py index f0a8cec..efb8a15 100644 --- a/pyprojections/camera.py +++ b/pyprojections/camera.py @@ -31,7 +31,6 @@ project_pinhole_inplace, project_spherical_inplace, inverse_project_pinhole_inplace, inverse_project_spherical_inplace) -import time import numpy as np from enum import Enum from typing import Tuple @@ -175,7 +174,6 @@ def zbuf_test(n: int): assert np.allclose(lut, lut1) and np.allclose(valid_mask, valid_mask1) assert np.count_nonzero(valid_mask[n:]) == 0 - ... if __name__ == '__main__': @@ -228,7 +226,7 @@ def zbuf_test(n: int): new_K, _, vfov, hfov = calculate_spherical_intrinsics( point_cloud, img_rows, img_cols) - # assert np.allclose(new_K, K, atol=1e-2) + assert np.allclose(new_K, K, atol=1e-2) if (not np.allclose(dimage, new_range_img, atol=1e-7)): print("range images are not approximately equals")