ultravideo / Open3DGen

Open-Source software for reconstructing textured 3D models from RGB-D images
MIT License
116 stars 24 forks source link

error: ‘min’ was not declared in this scope #1

Open Yuanzhuangz opened 2 years ago

Yuanzhuangz commented 2 years ago

when i ran ./build.sh ,there was en error: ‘min’ was not declared in this scope.

`yz@geoway-SYS-7048GR-TR:~/Open3DGen$ ./build.sh -- The C compiler identification is GNU 10.3.0 -- The CXX compiler identification is GNU 10.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found GLEW: /usr/include (found version "2.1.0") -- Found Open3D: /usr/lib/x86_64-linux-gnu/cmake/Open3D/Open3DConfig.cmake (found version "0.9.0") CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): CMakeLists.txt:33 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found Open3D 0.9.0 -- Found OpenCV: /usr (found version "4.5.1") -- OpenCV library status: -- config: /usr/lib/x86_64-linux-gnu/cmake/opencv4 -- version: 4.5.1 -- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_alphamat;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dnn_objdetect;opencv_dnn_superres;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_mcc;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_quality;opencv_rapid;opencv_reg;opencv_rgbd;opencv_saliency;opencv_shape;opencv_stereo;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_text;opencv_tracking;opencv_videostab;opencv_viz;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto -- include path: /usr/include/opencv4 -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable version "1.73.0", minimum required is "1.43") found components: serialization system filesystem thread program_options date_time timer chrono regex -- GTSAM include directory: /usr/local/lib/cmake/GTSAM/../../../include -- Configuring done -- Generating done -- Build files have been written to: /home/yz/Open3DGen/build Scanning dependencies of target Open3DGen [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/src/rgbd_utilities.cpp.o [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/src/visualizer.cpp.o [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/src/utilities.cpp.o [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/main.cpp.o [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/src/surface_mesh.cpp.o [ 35%] Building CXX object CMakeFiles/Open3DGen.dir/src/texture_projector.cpp.o [ 41%] Building CXX object CMakeFiles/Open3DGen.dir/src/math_modules.cpp.o [ 47%] Building CXX object CMakeFiles/Open3DGen.dir/src/uv_unwrapper.cpp.o [ 52%] Building CXX object CMakeFiles/Open3DGen.dir/src/pointcloud_registration.cpp.o [ 58%] Building CXX object CMakeFiles/Open3DGen.dir/src/realtime_mesh.cpp.o [ 70%] Building CXX object CMakeFiles/Open3DGen.dir/src/features.cpp.o [ 70%] Building CXX object CMakeFiles/Open3DGen.dir/src/shader_stuff.cpp.o [ 76%] Building CXX object CMakeFiles/Open3DGen.dir/src/poseg2.cpp.o [ 82%] Building CXX object CMakeFiles/Open3DGen.dir/src/pose_predictor.cpp.o [ 88%] Building CXX object CMakeFiles/Open3DGen.dir/libraries/xatlas/xatlas.cpp.o [ 94%] Building CXX object CMakeFiles/Open3DGen.dir/libraries/tinyobj/tiny_obj_loader.cpp.o In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/texture_projector.h:12, from /home/yz/Open3DGen/src/texture_projector.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/realtime_mesh.h:9, from /home/yz/Open3DGen/src/realtime_mesh.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/surface_mesh.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/main.cpp:13: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | er_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^

In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/pointcloud_registration.h:17, from /home/yz/Open3DGen/src/pointcloud_registration.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/texture_projector.h:12, from /home/yz/Open3DGen/src/texture_projector.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/surface_mesh.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/realtime_mesh.h:9, from /home/yz/Open3DGen/src/realtime_mesh.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/main.cpp:13: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/texture_projector.h:12, from /home/yz/Open3DGen/src/texture_projector.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/surface_mesh.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/realtime_mesh.h:9, from /home/yz/Open3DGen/src/realtime_mesh.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/pointcloud_registration.h:17, from /home/yz/Open3DGen/src/pointcloud_registration.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/main.cpp:13: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | b/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^

In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/pointcloud_registration.h:17, from /home/yz/Open3DGen/src/pointcloud_registration.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ /home/yz/Open3DGen/src/uv_unwrapper.cpp: In function ‘void stitcher3d::uv::pad_uvs(std::vector<Eigen::Matrix<double, 2, 1> >&, const std::vector&, double)’: /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:26: error: ‘min’ was not declared in this scope 111 | min(uv0.x(), min(uv1.x(), uv2.x())), | ^~~ /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:26: note: suggested alternatives: In file included from /usr/include/c++/10/functional:65, from /usr/include/eigen3/Eigen/Core:281, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/c++/10/bits/stl_algo.h:3479:5: note: ‘std::min’ 3479 | min(initializer_list<_Tp> l, _Compare __comp) | ^~~ In file included from /usr/include/opencv4/opencv2/features2d.hpp:47, from /home/yz/Open3DGen/src/s3d_camera.h:11, from /home/yz/Open3DGen/src/constants.h:6, from /home/yz/Open3DGen/src/uv_unwrapper.h:9, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/opencv4/opencv2/core.hpp:1443:17: note: ‘cv::min’ 1443 | CV_EXPORTS void min(const UMat& src1, const UMat& src2, UMat& dst); | ^~~ In file included from /usr/include/eigen3/Eigen/Core:416, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:508:45: note: ‘Eigen::half_impl::min’ 508 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) { | ^~~ In file included from /usr/local/include/boost/mpl/pair_view.hpp:24, from /usr/local/include/boost/mpl/transform.hpp:20, from /usr/local/include/boost/variant/variant.hpp:90, from /usr/local/include/boost/variant.hpp:17, from /usr/local/include/gtsam/inference/EliminateableFactorGraph.h:23, from /usr/local/include/gtsam/linear/GaussianFactorGraph.h:25, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizerParams.h:24, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizer.h:22, from /usr/local/include/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:23, from /home/yz/Open3DGen/src/poseg2.h:66, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/local/include/boost/mpl/min_max.hpp:27:8: note: ‘boost::mpl::min’ 27 | struct min | ^~~ /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:13: error: ‘min’ was not declared in this scope 111 | min(uv0.x(), min(uv1.x(), uv2.x())), | ^~~ /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:13: note: suggested alternatives: In file included from /usr/include/c++/10/functional:65, from /usr/include/eigen3/Eigen/Core:281, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/c++/10/bits/stl_algo.h:3479:5: note: ‘std::min’ 3479 | min(initializer_list<_Tp> l, _Compare __comp) | ^~~ In file included from /usr/include/opencv4/opencv2/features2d.hpp:47, from /home/yz/Open3DGen/src/s3d_camera.h:11, from /home/yz/Open3DGen/src/constants.h:6, from /home/yz/Open3DGen/src/uv_unwrapper.h:9, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/opencv4/opencv2/core.hpp:1443:17: note: ‘cv::min’ 1443 | CV_EXPORTS void min(const UMat& src1, const UMat& src2, UMat& dst); | ^~~ In file included from /usr/include/eigen3/Eigen/Core:416, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:508:45: note: ‘Eigen::half_impl::min’ 508 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) { | ^~~ In file included from /usr/local/include/boost/mpl/pair_view.hpp:24, from /usr/local/include/boost/mpl/transform.hpp:20, from /usr/local/include/boost/variant/variant.hpp:90, from /usr/local/include/boost/variant.hpp:17, from /usr/local/include/gtsam/inference/EliminateableFactorGraph.h:23, from /usr/local/include/gtsam/linear/GaussianFactorGraph.h:25, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizerParams.h:24, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizer.h:22, from /usr/local/include/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:23, from /home/yz/Open3DGen/src/poseg2.h:66, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/local/include/boost/mpl/min_max.hpp:27:8: note: ‘boost::mpl::min’ 27 | struct min | ^~~ In file included from /usr/local/include/gtsam/base/types.h:31, from /usr/local/include/gtsam/global_includes.h:22, from /usr/local/include/gtsam/base/Vector.h:27, from /usr/local/include/gtsam/base/Matrix.h:26, from /usr/local/include/gtsam/base/Manifold.h:22, from /usr/local/include/gtsam/base/Lie.h:25, from /usr/local/include/gtsam/base/VectorSpace.h:11, from /usr/local/include/gtsam/geometry/Point2.h:20, from /home/yz/Open3DGen/src/poseg2.h:60, from /home/yz/Open3DGen/src/poseg2.cpp:1: /usr/include/tbb/task_scheduler_init.h:21:154: note: ‘#pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ In file included from /usr/local/include/boost/bind.hpp:30, from /usr/local/include/gtsam/nonlinear/Values.h:37, from /usr/local/include/gtsam/nonlinear/NonlinearFactor.h:23, from /usr/local/include/gtsam/slam/PriorFactor.h:18, from /home/yz/Open3DGen/src/poseg2.h:62, from /home/yz/Open3DGen/src/poseg2.cpp:1: /usr/local/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~ In file included from /usr/local/include/gtsam/geometry/Unit3.h:36, from /usr/local/include/gtsam/geometry/Rot3.h:25, from /usr/local/include/gtsam/geometry/Pose3.h:24, from /usr/local/include/gtsam/geometry/CalibratedCamera.h:23, from /usr/local/include/gtsam/geometry/PinholePose.h:22, from /usr/local/include/gtsam/geometry/PinholeCamera.h:21, from /usr/local/include/gtsam/geometry/SimpleCamera.h:22, from /usr/local/include/gtsam/slam/ProjectionFactor.h:24, from /home/yz/Open3DGen/src/poseg2.h:63, from /home/yz/Open3DGen/src/poseg2.cpp:1: /usr/include/tbb/mutex.h:21:140: note: ‘#pragma message: TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | #pragma message("TBB Warning: tbb/mutex.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ gmake[2]: [CMakeFiles/Open3DGen.dir/build.make:160: CMakeFiles/Open3DGen.dir/src/uv_unwrapper.cpp.o] Error 1 gmake[2]: Waiting for unfinished jobs.... gmake[1]: [CMakeFiles/Makefile2:95: CMakeFiles/Open3DGen.dir/all] Error 2 gmake: [Makefile:103: all] Error 2 `

But i have solved it by adding the following code in the uv_unwrapper.cpp `

include

using namespace std `

Yuanzhuangz commented 2 years ago

the exacte error is /home/yz/Open3DGen/src/uv_unwrapper.cpp: In function ‘void stitcher3d::uv::pad_uvs(std::vector<Eigen::Matrix<double, 2, 1> >&, const std::vector<unsigned int>&, double)’: /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:26: error: ‘min’ was not declared in this scope 111 | min(uv0.x(), min(uv1.x(), uv2.x())), | ^~~ /home/yz/Open3DGen/src/uv_unwrapper.cpp:111:26: note: suggested alternatives: In file included from /usr/include/c++/10/functional:65, from /usr/include/eigen3/Eigen/Core:281, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/c++/10/bits/stl_algo.h:3479:5: note: ‘std::min’ 3479 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ In file included from /usr/include/opencv4/opencv2/features2d.hpp:47, from /home/yz/Open3DGen/src/s3d_camera.h:11, from /home/yz/Open3DGen/src/constants.h:6, from /home/yz/Open3DGen/src/uv_unwrapper.h:9, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/opencv4/opencv2/core.hpp:1443:17: note: ‘cv::min’ 1443 | CV_EXPORTS void min(const UMat& src1, const UMat& src2, UMat& dst); | ^~~ In file included from /usr/include/eigen3/Eigen/Core:416, from /usr/include/Open3D/Camera/PinholeCameraIntrinsic.h:29, from /usr/include/Open3D/Open3D.h:30, from /home/yz/Open3DGen/src/uv_unwrapper.h:3, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:508:45: note: ‘Eigen::half_impl::min’ 508 | EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) { | ^~~ In file included from /usr/local/include/boost/mpl/pair_view.hpp:24, from /usr/local/include/boost/mpl/transform.hpp:20, from /usr/local/include/boost/variant/variant.hpp:90, from /usr/local/include/boost/variant.hpp:17, from /usr/local/include/gtsam/inference/EliminateableFactorGraph.h:23, from /usr/local/include/gtsam/linear/GaussianFactorGraph.h:25, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizerParams.h:24, from /usr/local/include/gtsam/nonlinear/NonlinearOptimizer.h:22, from /usr/local/include/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:23, from /home/yz/Open3DGen/src/poseg2.h:66, from /home/yz/Open3DGen/src/surface_mesh.h:15, from /home/yz/Open3DGen/src/uv_unwrapper.h:10, from /home/yz/Open3DGen/src/uv_unwrapper.cpp:1: /usr/local/include/boost/mpl/min_max.hpp:27:8: note: ‘boost::mpl::min’ 27 | struct min | ^~~

teo3n commented 2 years ago

This seems like your compiler doesn't find the correct standard libraries. The function min(...) is defined in the algorithm header, which is part of the STL. From what I can see from the CMake output, you are using gcc. I always just used clang, and I'd recommend you to do so as well. If you are on Ubuntu you can use update-alternatives to set cc and cpp to point to clang over gcc.

I replaced the function calls with explicit std::min, if you could try the newest version?

Yuanzhuangz commented 2 years ago

This seems like your compiler doesn't find the correct standard libraries. The function min(...) is defined in the algorithm header, which is part of the STL. From what I can see from the CMake output, you are using gcc. I always just used clang, and I'd recommend you to do so as well. If you are on Ubuntu you can use update-alternatives to set cc and cpp to point to clang over gcc. I replaced the function calls with explicit std::min, if you could try the newest version?

I will try it after working through your projecte,but i am encounting another problem. Although I have 8 tesla k80 and 128G RAM,i am stuck at

  • average frametime : 288ms ........

many

  • [Open3D WARNING]Read PNG failed: unable to parse header

  • triangulated clouds size : 0, depth clouds 214

with "camera track" is not responding . if i force to quit ,the program will be killed.

teo3n commented 2 years ago

average frametime : 288ms ........

A tesla K80 isn't exactly a good GPU for this application, as the texture projection is written using OpenGL compute shaders. A modern "gaming" graphics card would be more suitable. And even if K80 was suitable, this program makes no use whatsoever of multiple GPUs. That being said, average frametimes are calculated before any GPU stuff is necessary, and therefore your CPU actually plays a larger role in the localization performance.

[Open3D WARNING]Read PNG failed: unable to parse header

My bad, I forgot to push the texture projection blanks. I'll fix that soon.

triangulated clouds size : 0, depth clouds 214

This is correct, it has projected 214 RGB-D images into point clouds.

with "camera track" is not responding . if i force to quit ,the program will be killed.

I'm not sure what you mean, what is the most recent console output at this stage?

edit: After some further investigation, I think the problem must be with intel Open3D -library's visualization.

triangulated clouds size : 0, depth clouds 214

Clearly states the localization was successful, therefore only the visualization fails. Try to give the program a bit more time, maybe 5min, to process everything. The pointclouds are quite large so it may take a bit. Also, are your graphics drivers not up to date, perhaps? If the issue still persists, please comment out the line #define DEBUG_VISUALIZE in constants.h, and recompile. The output will still be written to a .obj -file.

Yuanzhuangz commented 2 years ago

average frametime : 288ms ........

Get it.

[Open3D WARNING]Read PNG failed: unable to parse header I will appreciate it if you can inform me immediately when you fix it.

with "camera track" is not responding . if i force to quit ,the program will be killed. I don't know whether it is due to the "Open3D WARNING",the program and the dynamic image window "image"and"camera track" are stuck.The recent consolo output stop at the triangulated clouds size and the most recent console is followed:

... [Open3D WARNING]Read PNG failed: unable to parse header [Open3D WARNING]Read PNG failed: unable to parse header ... [Open3D WARNING]Read PNG failed: unable to parse header triangulated clouds size : 0, depth clouds 214

teo3n commented 2 years ago

I will appreciate it if you can inform me immediately when you fix it.

I have fixed it already, please give it a try.

Yuanzhuangz commented 2 years ago

average frametime : 288ms ........

Get it,but i wonder why there is no need for parallel GPUs.

[Open3D WARNING]Read PNG failed: unable to parse header

I will appreciate it if you can inform me immediately when you fix it.

with "camera track" is not responding . if i force to quit ,the program will be killed.

I don't know whether it is due to the "Open3D WARNING",the program and the dynamic image window "image"and"camera track" are stuck.The recent consolo output stop at the triangulated clouds size and the most recent console is followed:

`... [Open3D WARNING]Read PNG failed: unable to parse header

[Open3D WARNING]Read PNG failed: unable to parse header

...

[Open3D WARNING]Read PNG failed: unable to parse header

triangulated clouds size : 0, depth clouds 214 `

Yuanzhuangz commented 2 years ago

I will appreciate it if you can inform me immediately when you fix it.

I have fixed it already, please give it a try.

I have tried it, the min function and the warning are fixed. but i'm still stay at the stage 'triangulated clouds size : 0, depth clouds 214'

may be the stage time-comsuming?

I have run the demo more than 12 hoursand the memory usage have reduced to 6GB from 63GB,but the console still stays at the previous stage with no output in the outfiles.