文章链接:Seamless Texture Optimization for RGB-D Reconstruction
Github链接:fdp0525/SeamlessTex
cmake -D CMAKE_INSTALL_PREFIX=/usr/local/ceres1.14 -D BUILD_SHARED_LIBS=ON ..
安装opencv2.4.10:之前的博客->opencv2.4.10+ubuntu18安装
还需要安装qt。安装教程百度即可,需要3个多G的空间
(为什么需要qt?因为作者提供的可执行文件有bug,需要重新编译)代码最大的坑
需要安装cuda10.1,安装指南百度即可,也很简单
进入下载好的代码文件夹,进入bin文件夹
ldd seamlessFinalVersion
这条命令是查看项目的可执行文件需要的链接库,是否齐全,正确结果应该是
linux-vdso.so.1 (0x00007ffcc2baa000)
libopencv_core.so.2.4 => /usr/local/opencv2410/lib/libopencv_core.so.2.4 (0x00007f460bbdb000)
libopencv_highgui.so.2.4 => /usr/local/opencv2410/lib/libopencv_highgui.so.2.4 (0x00007f460b98c000)
libopencv_imgproc.so.2.4 => /usr/local/opencv2410/lib/libopencv_imgproc.so.2.4 (0x00007f460b49a000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f460b222000)
libtbb.so.2 => /usr/lib/x86_64-linux-gnu/libtbb.so.2 (0x00007f460afe6000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f460ada3000)
libceres.so.1 => /usr/local/lib/libceres.so.1 (0x00007f460a8f0000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f460a688000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f460a456000)
libglog.so.0 => /usr/lib/x86_64-linux-gnu/libglog.so.0 (0x00007f460a225000)
libfftw3.so.3 => /usr/lib/x86_64-linux-gnu/libfftw3.so.3 (0x00007f4609e23000)
libcudart.so.10.1 => /usr/local/cuda/lib64/libcudart.so.10.1 (0x00007f4609ba7000)
libQt5Gui.so.5 => /opt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Gui.so.5 (0x00007f460935a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f460913b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4608d2e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4608990000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4608778000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4608387000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f460816a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4607f62000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f4607d0c000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f4607848000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f4607605000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007f4606fc3000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007f4606d0e000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f4606aba000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f46067a3000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f4606468000)
libgstapp-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 (0x00007f4606259000)
libgstriff-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstriff-1.0.so.0 (0x00007f460604b000)
libgstpbutils-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstpbutils-1.0.so.0 (0x00007f4605e13000)
libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007f4605b9d000)
libv4l1.so.0 => /usr/lib/x86_64-linux-gnu/libv4l1.so.0 (0x00007f4605997000)
libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007f4605788000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f4605562000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f4605354000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4605150000)
libspqr.so.2 => /usr/lib/x86_64-linux-gnu/libspqr.so.2 (0x00007f4604f25000)
libcholmod.so.3 => /usr/lib/x86_64-linux-gnu/libcholmod.so.3 (0x00007f4604c4f000)
liblapack.so.3 => /usr/lib/x86_64-linux-gnu/liblapack.so.3 (0x00007f46043b1000)
libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007f4604144000)
libcxsparse.so.3 => /usr/lib/x86_64-linux-gnu/libcxsparse.so.3 (0x00007f4603f19000)
libgflags.so.2.2 => /usr/lib/x86_64-linux-gnu/libgflags.so.2.2 (0x00007f4603cf4000)
libunwind.so.8 => /usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007f4603ad9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f460c807000)
libQt5Core.so.5 => /opt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Core.so.5 (0x00007f460333e000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f46030b2000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f4602e94000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f4602c8d000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f4602a89000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f460287c000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f4602544000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f460233e000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f4602118000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f4601dfb000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f4601bd7000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f4601838000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f4601622000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f46013d5000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f4601190000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f4600f86000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f4600d83000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f4600b73000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f4600968000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f460075e000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f460055b000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f4600358000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f4600146000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f45fff3e000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f45ffccd000)
libgstbase-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007f45ffa58000)
libgstaudio-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstaudio-1.0.so.0 (0x00007f45ff7e3000)
libgsttag-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0 (0x00007f45ff5a8000)
libgstvideo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007f45ff30f000)
libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007f45ff100000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f45feee8000)
libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007f45fec6e000)
libsuitesparseconfig.so.5 => /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.5 (0x00007f45fea6b000)
libamd.so.2 => /usr/lib/x86_64-linux-gnu/libamd.so.2 (0x00007f45fe862000)
libcolamd.so.2 => /usr/lib/x86_64-linux-gnu/libcolamd.so.2 (0x00007f45fe65b000)
libccolamd.so.2 => /usr/lib/x86_64-linux-gnu/libccolamd.so.2 (0x00007f45fe451000)
libcamd.so.2 => /usr/lib/x86_64-linux-gnu/libcamd.so.2 (0x00007f45fe247000)
libmetis.so.5 => /usr/lib/x86_64-linux-gnu/libmetis.so.5 (0x00007f45fdfd9000)
libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007f45fdbfa000)
libicui18n.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/lib/libicui18n.so.56 (0x00007f45fd761000)
libicuuc.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/lib/libicuuc.so.56 (0x00007f45fd3a9000)
libicudata.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/lib/libicudata.so.56 (0x00007f45fb9c6000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f45fb7c4000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f45fb593000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f45fb2dd000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f45fb029000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f45fae01000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f45fab5c000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f45fa959000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f45fa74c000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f45fa524000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f45fa30a000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f45fa0b6000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f45f9e18000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007f45f9c0f000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f45f99dd000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f45f9761000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f45f9543000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f45f92fc000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f45f90f8000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f45f8ef2000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f45f8ca5000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f45f8a78000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f45f8871000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f45f865c000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f45f8455000)
如果有哪一条显示not found!!!那么说明没有安装,或者链接位置不对
libIlmImf.so.7 => not found
libHalf.so.6 => not found
如果显示这两条,那么应该是链接位置不对,因为这几个都是ubuntu系统默认安装的库,所以需要找到正确位置然后链接过去,如果有其他显示not found,可能是没有装全。
终端依次输入下列两条命令,找到文件所在位置
sudo find / -name libIlmImf.so
sudo find / -name libHalf.so
有一个路径是/usr/lib下的,我的是/usr/lib/x86_64-linux-gnu/libIlmImf.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIlmImf.so.7
sudo ln -s /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libHalf.so.6
这两行指令代表生成了一个链接,名为libIlmImf.so.7,指向libIlmImf.so,其实就是一个文件,有两个名字。
再次运行ldd seamlessFinalVersion
,没有出现not found的链接库了。
打开seamlessFinalVersion.pro文件,确认一下282行的INCLUDEPATH
是否对应你安装的opencv位置
如果你的opencv安装位置不是默认位置,那么需要修改,并且下一行的LIBS
需要添加额外代码,-L代表指定搜索地址
最后把LIBS += -ltiff -ltbb -lgomp -lceres
这一行改为LIBS += -ltiff -ltbb -lgomp -lceres -ljpeg -lpng16
我这一段修改之后是这样的
INCLUDEPATH += /usr/include/eigen3 /usr/local/include
INCLUDEPATH += /usr/local/opencv2410/include
LIBS += -L/usr/local/opencv2410/lib/ -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videostab
LIBS += -ltiff -ltbb -lgomp -lceres -ljpeg -lpng16
LIBS += -lglog
INCLUDEPATH += /usr/include/OpenEXR
LIBS += -lfftw3 -lIlmImf -lHalf
进入编译生成可执行文件的位置
./seamlessFinalVersion [bloster文件夹位置] [bloster.ply文件位置]