硬解码开发过程中遇到的一些c++和python混合编程问题
以下是开发过程中遇到的C++的一些特性记录. tags: C/C++, Decode, GPU, Python category: Documents 当前目的开发c++硬解码并使用python调用其动态库实现一次抽一次帧. 以下是开发过程中遇到的C++的一些特性记录. ...
以下是开发过程中遇到的C++的一些特性记录. tags: C/C++, Decode, GPU, Python category: Documents 当前目的开发c++硬解码并使用python调用其动态库实现一次抽一次帧. 以下是开发过程中遇到的C++的一些特性记录. ...
参考三维重建公开课前两节课 2022B站最好最全的【三维重建】课程!!!北邮教授竟然把三维重建讲的如此通俗易懂,学不会UPZHIJIE 退网下架!!!-人工智能/计算机视觉/三维重建_哔哩哔哩_bilibili 1. 摄像机几何 1.1. 针孔模型&透镜 1.1.1. 针孔相机 早期相机: 小孔成像(添加屏障→减少模糊) 需要研究的是虚拟像平面 虚拟像平面到针孔的距离等于焦距 虚拟像平面的成像大小等于像平面的成像大小, 方向与原物体相同, 研究方便 缩小光圈可以使成像更清晰, 但是通过的光更少(成像更暗) 为了使成像更亮, 可以增加一个透镜 小孔成像系统建立数学模型 摄像机坐标系下, 三维点到平面的关系 $$ P=\left[\begin{array}{l}x \\y \\z\end{array}\right] \rightarrow P^{\prime}=\left[\begin{array}{l}x^{\prime} \\y^{\prime}\end{array}\right] \quad\left\{\begin{array}{l}x^{\prime}=f \frac{x}{z} \\y^{\prime}=f \frac{y}{z}\end{array}\right. $$ ...
Deep Learning With PyTorch - Full Course 1. Installation PyTorch 2. Tensor Basics import torch torch.zeros() torch.ones() torch.rand() # 正数随机(0, 1) torch.randn() # 带负数的随机(-1, 1) torch.tensor([[1, 1], [2, 3]]) torch.add(a, b) torch.mul(a, b) # 哈德马积 torch.mm(a, b) # 矩阵相乘 a.t() # 转置 a.add_(1) # 矩阵内数值全部+1 # 也可以直接 a+=1, 在numpy中也可以用 a = torch.rand(2, 4) a.view(-1, 2) #使矩阵从(2, 4)->(4, 2), -1是缺省值自动计算 torch.xxxx(xxxxx ,dtype=float (int32)) # 可以定义数据类型 import numpy as np a = np.ones() b = torch.from_numpy(a) # np.ndarray -> tensor c = b.numpy() # tensor -> np.ndarray # 书中的一些其他基础函数 a = torch.arange(12) # 新定义1-12个元素张量 # tensor([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) x.shape # 显示张量的形状 # torch.Size([12]) x.numel() # 只显示张量的元素数量 # 12 tensor格式是专门为cuda准备的 tensor和np.ndarray 相互转换时, 变量的内存共享, eg: 使用add_, 都会变. if torch.cuda.is_available(): device = torch.device("cuda") x = torch.ones(5, device=device) # 写入显存 y = torch.ones(5) y = y.to(device) # 写入显存2 z = x + y print(z) # z = z.to("cpu") # 只有参数放回内存之后才可以改为numpy格式 z.numpy() # 报错, 显存中的tensor参数不能变成numpy格式 numpy格式无法放入显存 选定显卡 import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" # or # when loading model model.load_state_dict(torch.load(PATH, map_location="cuda:0")) model.to(device) # or when initing the model model_load = NeuralNetMultiClass(input_size, hidden_size, num_classes).to(device) ...
第1节课 transfer learning Inductive Transfer Learning 归纳式迁移学习 Transductive Transfer Learning 直推式迁移学习 Domain Adaptation 领域的自适应 任务一致,数据不一致 Unsupervised Transfer Learning 无监督式迁移学习 DA one-step Xs=Xt,P(Xs)≠P(Xt) 数据空间一致,数据分布不一致 Xs≠Xt 数据空间不一致 multi-step 多步 (如同时含有文字和图片) ...
网格修复 1. 网格介绍 网格指的是三维多边形网格模型,以下简称为“网格”。简单来说,可以给网格下一个简单定义:由多边形集合定义的,用以表示三维模型表面轮廓的拓扑和空间结构称为“网格”,英文称作“polygon mesh”或“mesh”。 ...
https://github.com/TheFrenchLeaf/Bundler 安装cmake 安装bundler mkdir build cd build cmake .. make apt-get install imagemagick Linux => use makefile in program/main or Cmake. => Note the fact that the compilation will use the following resident libraries : - jpeg - lapack blas gfortran (included in most lapack distibution) - sometimes atlas. => CMAKE USAGE : Go to the extracted archive path. $ mkdir Output $ cd Output $ cmake -G "CodeBlocks - Unix Makefiles" .. $ make => Your binaries will be in Output/src ! apt-get install -y libjpeg-dev liblapack-dev libblas-dev gfortran libatlas-base-dev 问题1://usr/lib/x86_64-linux-gnu/libblas.so.3: error adding symbols: DSO missing from command line [ 49%] Building CXX object src/CMakeFiles/RadialUndistort.dir/RadialUndistort.cpp.o [ 50%] Building CXX object src/CMakeFiles/RadialUndistort.dir/LoadJPEG.cpp.o [ 51%] Linking CXX executable RadialUndistort /usr/bin/c++ -fopenmp -rdynamic CMakeFiles/RadialUndistort.dir/RadialUndistort.cpp.o CMakeFiles/RadialUndistort.dir/LoadJPEG.cpp.o -o RadialUndistort ../lib/imagelib/libimagelib.a ../lib/matrix/libmatrix.a -ljpeg -llapack ../lib/cblas/libcblas.a ../lib/cminpack/libcminpack.a -lgfortran /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/liblapack.so: undefined reference to symbol 'dgemm_' //usr/lib/x86_64-linux-gnu/libblas.so.3: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status src/CMakeFiles/RadialUndistort.dir/build.make:126: recipe for target 'src/RadialUndistort' failed make[2]: *** [src/RadialUndistort] Error 1 CMakeFiles/Makefile2:352: recipe for target 'src/CMakeFiles/RadialUndistort.dir/all' failed make[1]: *** [src/CMakeFiles/RadialUndistort.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2 解决: Resolved by adding -lblas to the end of: src/CMakeFiles/Bundle2PMVS.dir/link.txt src/CMakeFiles/Bundler.dir/link.txt src/CMakeFiles/RadialUndistort.dir/link.txt 修改 ~~MATCHKEYS=$BASE_PATH/Output/src/KeyMatchFull BUNDLER=$BASE_PATH/Output/src/Bundler~~ MATCHKEYS=$BASE_PATH/build/src/KeyMatchFull BUNDLER=$BASE_PATH/build/src/Bundler chmod -R a+x bin/* bin/sift无法运行 linux内核版本问题?搁置。。。 ../bin/sift bash: ../bin/sift: No such file or directory
1. 安装 下载项目 git clone --recursive https://github.com/nvlabs/instant-ngp cd instant-ngp 安装环境 pip install -r requirements.txt cmake -S . -B build 问题1 CMake Error: The source directory "/home/xxx/graphics_primitives/instant-ngp/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. # 老版本cmake会读取build下的配置文件, 新版本不用, 所以升级cmake版本 或 CMake Error at CMakeLists.txt:9 (cmake_minimum_required): CMake 3.19 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! 解决: 升级CMake 非root安装cmake wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0.tar.gz tar zxvf cmake-3.23.0.tar.gz && cd cmake-3.23.0 ~~./bootstrap~~ ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF # 非root下可以选择关闭openssl防止报错 ./configure --prefix=/.../cmake # 设置在自己目录下 make make install vim ~/.bashrc export PATH=/home/xxx/cmake/bin:$PATH source ~/.bashrc 问题: ./bootstrap时报错 CMake Error at Utilities/cmcurl/CMakeLists.txt:586 (message): Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL. 解决: 没有开发版OpenSSL, 不使用openssl # apt-get install libssl-dev # 非root ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF 问题: ./configure –prefix=/…/cmake 地址写错或没有权限 -- No release type specified. Setting to 'Release'. CMake Error at CMakeLists.txt:38 (message): Some instant-ngp dependencies are missing. If you forgot the "--recursive" flag when cloning this project, this can be fixed by calling "git submodule update --init --recursive". CMAKE_CUDA_ARCHITECTURES must be valid if set. 解决: 删除build文件夹 cmake --build build --config RelWithDebInfo -j 16 问题1: nvcc fatal : Unsupported gpu architecture ‘compute_80+PTX’ [ 1%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cpp_api.cu.o [ 3%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cutlass_mlp.cu.o [ 5%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/loss.cu.o [ 7%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o [ 10%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/encoding.cu.o [ 10%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common_device.cu.o [ 12%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o [ 14%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o [ 18%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/object.cu.o [ 18%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/reduce_sum.cu.o [ 20%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/fully_fused_mlp.cu.o nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:103: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cpp_api.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cpp_api.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs.... nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:145: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/loss.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/loss.cu.o] Error 1 nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:75: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common.cu.o] Error 1 dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:117: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cutlass_mlp.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/cutlass_mlp.cu.o] Error 1 nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:89: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common_device.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/common_device.cu.o] Error 1 nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:159: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/network.cu.o] Error 1 nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:131: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/encoding.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/encoding.cu.o] Error 1 dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:187: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o] Error 1 nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' nvcc fatal : Unsupported gpu architecture 'compute_80+PTX' dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:173: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/object.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/object.cu.o] Error 1 dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:215: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/fully_fused_mlp.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/fully_fused_mlp.cu.o] Error 1 dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:201: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/reduce_sum.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/reduce_sum.cu.o] Error 1 CMakeFiles/Makefile2:305: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/all' failed make[1]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 49%] Built target glfw_objects Makefile:90: recipe for target 'all' failed make: *** [all] Error 2 解决: 在instant-ngp/CMakeLists.txt顶部添加: 后面的数字是显卡的算力, 以nccl中设定的算力为准 set( ENV{TCNN_CUDA_ARCHITECTURES} 75 ) 问题2: make[1]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2 Consolidate compiler generated dependencies of target tiny-cuda-nn [ 29%] Built target glfw_objects [ 30%] Building CUDA object dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/shampoo.h(753): error: identifier "cublasSetWorkspace" is undefined detected during: instantiation of "tcnn::ShampooOptimizer<T>::ShampooOptimizer(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/src/optimizer.cu(71): here instantiation of "tcnn::Optimizer<T> *tcnn::create_optimizer<T>(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/average.h(65): here /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/shampoo.h(771): error: identifier "cublasSetWorkspace" is undefined detected during: instantiation of "tcnn::ShampooOptimizer<T>::ShampooOptimizer(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/src/optimizer.cu(71): here instantiation of "tcnn::Optimizer<T> *tcnn::create_optimizer<T>(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/average.h(65): here /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/shampoo.h(794): error: identifier "cublasSetWorkspace" is undefined detected during: instantiation of "tcnn::ShampooOptimizer<T>::ShampooOptimizer(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/src/optimizer.cu(71): here instantiation of "tcnn::Optimizer<T> *tcnn::create_optimizer<T>(const tcnn::json &) [with T=float]" /home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/optimizers/average.h(65): here 3 errors detected in the compilation of "/home/xxx/graphics_primitives/instant-ngp/dependencies/tiny-cuda-nn/src/optimizer.cu". dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/build.make:187: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o' failed make[2]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/optimizer.cu.o] Error 1 CMakeFiles/Makefile2:305: recipe for target 'dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/all' failed make[1]: *** [dependencies/tiny-cuda-nn/src/CMakeFiles/tiny-cuda-nn.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2 原因: nccl对应cuda版本是11.0, 不是11.4. 解决: 重装cuda或nccl cmake查错: 后面加-v, 能显示报错的行. 只需要python虚拟环境的服务器中的配置 pip install -r requirements.txt export TCNN_CUDA_ARCHITECTURES=86 下载并安装 OptiX,并设置 OptiX_INSTALL_DIR 环境变量 [https://developer.download.nvidia.cn/designworks/optix/secure/7.4.0/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64.sh?Y1wWl64XXNqxb7ETeQnMC1FDmN-fg1gq7yFZP75uvqo80VkyJjPEU3cEJtIRP3v6wmsgw55EbgwyzswJ4A0GXWe5B-UAyQ5Xb5u7L5Sn7Ty8RTcxARIb_EABVVHU-MCH_g75f9_YxdflsT30csKrIWTrIdMjRbKKwOb4lXPIGyZcCQo_3zg&t=eyJscyI6ImdzZW8iLCJsc2QiOiJodHRwczpcL1wvd3d3Lmdvb2dsZS5jb21cLyJ91](https://developer.download.nvidia.cn/designworks/optix/secure/7.4.0/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64.sh?Y1wWl64XXNqxb7ETeQnMC1FDmN-fg1gq7yFZP75uvqo80VkyJjPEU3cEJtIRP3v6wmsgw55EbgwyzswJ4A0GXWe5B-UAyQ5Xb5u7L5Sn7Ty8RTcxARIb_EABVVHU-MCH_g75f9_YxdflsT30csKrIWTrIdMjRbKKwOb4lXPIGyZcCQo_3zg&t=eyJscyI6ImdzZW8iLCJsc2QiOiJodHRwczpcL1wvd3d3Lmdvb2dsZS5jb21cLyJ91112#) 需要将 CUDA 升级至 11.4,可以多版本 CUDA 并存,但是将环境变量链接至 export OptiX_INSTALL_DIR=/home/xxx/Install/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64 ...
目录 默认Pipline中的组件算法 参考AliceVision和meshroom程序自带说明文档 AliceVision | Photogrammetric Computer Vision Framework 下图是Meshroom默认pipline,其中实线连接的参数是初始设定的值;虚线连接的参数是实现设定的值。 ...
NeRF入门介绍视频 NeRF系列公开课01 | 基于NeRF的三维内容生成_哔哩哔哩_bilibili NeRF简介_哔哩哔哩_bilibili 1. NeRF相比于三维重建的区别 一些场景的内容特别复杂, 使用三维重建效果较差, 但是NeRF渲染三维场景可以达到类似于相机拍摄的效果 没有像传统常见方式一样使用hard shape的表征方式, 而是使用soft shape. hard shape需要object segmentation mask(抠图, 把物体的背景都去掉) hard shape有boundary discontinuity(边界不连续)的问题需要解决 只使用相机和物体表面之间的ray上的很多samples做计算, 性能消耗少很多 NeRF缺点是, 目前没有很好的工具去编辑物体的颜色形状等 2. NeRF的工作原理 ...
1. 安装meshroom git clone --recursive git://github.com/alicevision/meshroom cd meshroom git checkout v2021.1.0 # <- 版本必须和Alicevision的版本相同 pip install -r requirements.txt 2. 不编译AliceVision使用meshroom 下载一个合适的 release 版本 Checkout corresponding Meshroom (ui) version/tag to avoid versions incompatibilities LD_LIBRARY_PATH=~/foo/Meshroom-2021.1.0/aliceVision/lib/ PATH=$PATH:~/foo/Meshroom-2021.1.0/aliceVision/bin/ PYTHONPATH=$PWD python3 meshroom/ui #meshroom alicevision export LD_LIBRARY_PATH=/algorithm/xxx/meshroom_save/Meshroom-2021.1.0-av2.4.0-centos7-cuda10.2/aliceVision/lib:$LD_LIBRARY_PATH export PATH=/algorithm/xxx/meshroom_save/Meshroom-2021.1.0-av2.4.0-centos7-cuda10.2/aliceVision/bin:$PATH 安装cx_Freeze (不打包项目,不用setup.py就不装) ~~pip3 install --upgrade pip pip install -i https://marcelotduarte.github.io/packages/ cx_Freeze python -m pip install cx_Freeze --upgrade~~ conda install -c conda-forge cx_freeze ...
纹理映射 纹理映射 (Texture Mapping) 是一种将物体空间坐标点转化为纹理坐标,进而从纹理上获取对应点的值,以增强着色细节的方法。 左:网格模型;右:纹理映射后的模型 纹理映射有以下四个步骤,但并不是每个都要使用,只是体现纹理映射可以被灵活操控,以获得我们想要的效果。 ...
0. 需求 修改meshroom未修改稠密点云的输出格式,需要在alicevision项目编译前修改代码 AliceVision/src/software/pipeline# vim main_meshing.cpp if(saveRawDensePointCloud) { ALICEVISION_LOG_INFO("Save dense point cloud before cut and filtering."); StaticVector<StaticVector<int>> ptsCams; delaunayGC.createPtsCams(ptsCams); sfmData::SfMData densePointCloud; createDenseSfMData(sfmData, mp, delaunayGC._verticesCoords, ptsCams, densePointCloud); removeLandmarksWithoutObservations(densePointCloud); if(colorizeOutput) sfmData::colorizeTracks(densePointCloud); sfmDataIO::Save(densePointCloud, (outDirectory/"densePointCloud_raw.abc").string(), sfmDataIO::ESfMData::ALL_DENSE); } // 修改 densePointCloud_raw.abc -> densePointCloud_raw.ply 1. Nvidia docker安装AliceVision host克隆alicevision项目 git clone --recursive https://github.com/alicevision/AliceVision.git cd AliceVision/ && git checkout v2.4.0 mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DALICEVISION_USE_ALEMBIC=ON .. 装组件 参考AliceVision/CMakeLists.txt获得各组件的版本 下载编译或apt-get安装 -- Boost 1_76 found. 编译 -- OpenEXR found. (Version 2.5.8) 编译 可选: libjpeg-turbo-2.1.1 编译 -- OpenImageIO found. apt-get install libopenimageio-dev -- eigen3 3.4.0 编译(可选) -- git clone ceres-solver 编译 apt-get install libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev apt-get install libmetis-dev liblapack-dev libcxsparse3 libgflags-dev libgtest-dev -- geogram-1.7.6 编译 apt-get install libxinerama-dev libxcursor-dev apt-get install libglfw3 libglfw3-dev xlibmesa-glu-dev # https://stackoverflow.com/questions/8321628/compiling-error-cannot-find-lglu-and-lgl-in-kubuntu-linux -- alembic 编译 apt-get install zlib1g-dev make 编译 出现error,修改问题部分 make install 2. AliceVision docker安装AliceVision 下载docker image docker pull alicevision/alicevision-deps:cuda10.2-ubuntu18.04 克隆项目 git clone --recursive https://github.com/alicevision/AliceVision.git cd AliceVision/ && git checkout v2.4.0 mkdir build && cd build 安装依赖, 参考AliceVision/CMakeLists.txt获得各组件的版本 -- zlib 1.2.11 编译 编译项目 export AV_DEV=/opt/AliceVision_git && \ export AV_INSTALL=/opt/AliceVision_install && \ cmake -DCMAKE_BUILD_TYPE=Release -DALICEVISION_USE_ALEMBIC=ON \ -DOPENIMAGEIO_LIBRARY_DIR_HINTS:PATH=/opt/AliceVision_install/lib/ \ -DOPENIMAGEIO_INCLUDE_DIR:PATH=/opt/AliceVision_install/include/ \ -DOPENEXR_HOME:PATH=/opt/AliceVision_install/include/OpenEXR \ -DGEOGRAM_INSTALL_PREFIX:PATH=/opt/AliceVision_install/lib \ -DGEOGRAM_INCLUDE_DIR:PATH=/opt/AliceVision_install/include/geogram1 \ .. make 编译 出现error,修改问题部分 make install ...