libSGM
libSGM copied to clipboard
has it changed from stereo_movie into stereosgm_movie?
The Readme says that
$ cd sample/movie/
$ ./stereo_movie left_image_%04d.pgm right_image_%04d.pgm
to execute sample. but there is no stereo_movie file? Instead a stereosgm_movie .cpp. So How should I do? Sorry, I'm new to cmake. I can't figure out how to make them function.
Hello, you need to check the base paper option when you're in CMake so that you compile the paper file as well, or you can change the "CaceLists.txt" option in the libSGM directory to change it to "ON"
Hello. I'm sorry that readme is a bit unkind.
Try @yuzw213's comment or re-run CMake with option -DENABLE_SAMPLES=on
:
$ cd /path/to/libSGM
$ mkdir build && cd build
$ cmake .. -DENABLE_SAMPLES=on
$ make
$ ls sample/movie/
CMakeFiles Makefile cmake_install.cmake stereo_movie
@ykitta-fixstars Hello, do you have any suggestions for big picture input processing?and Do I need to change your algorithm?
@yuzw213 I haven't check big picture input. If you already confirm doesn't work, please create issue about it? we'll try that.
@ykitta-fixstars Thanks for your reply. Yes, it doesn't work for big picture input.
@ykitta-fixstars I'm sorry, I tried again. It was mainly a matter of entering the color bit depth format of the picture. It had nothing to do with the size of the picture. I changed the code and the program could run
@yuzw213 Okay. Thank you for your report. I'm glad for you to run successfully.
I have the same issue. The make was successful but there is no directory sample/movie.
I tried -DENABLE_SAMPLES=on, it throws errors like this:
`-- CUDA_ARCH: "-arch=sm_50" CMake Error at CMakeLists.txt:39 (add_subdirectory): add_subdirectory given source "sample/image" which is not an existing directory.
CMake Error at CMakeLists.txt:40 (add_subdirectory): add_subdirectory given source "sample/movie" which is not an existing directory.
CMake Error at CMakeLists.txt:41 (add_subdirectory): add_subdirectory given source "sample/reprojection" which is not an existing directory.
CMake Error at CMakeLists.txt:42 (add_subdirectory): add_subdirectory given source "sample/benchmark" which is not an existing directory.
-- Configuring incomplete, errors occurred! See also "/home/user/Desktop/libSGM/build/CMakeFiles/CMakeOutput.log". See also "/home/user/Desktop/libSGM/build/CMakeFiles/CMakeError.log". `
@niraj-bhujel Hi. Thank you for trying.
Please show detail build instruction (I want to know build path from project root, for example) and OS, CUDA. CMake versions.
I confirmed following build instruction at my docker environment (Ubuntu 18.04+CUDA 9.2+CMake 3.10.2).
(I tried at environment doesn't have GPU, so I added -DAUTO_DETECT_ARCH=off
option)
developer@e5529e95a909:/tmp$ git clone https://github.com/fixstars/libSGM.git
Cloning into 'libSGM'...
remote: Enumerating objects: 610, done.
remote: Counting objects: 100% (610/610), done.
remote: Compressing objects: 100% (241/241), done.
remote: Total 2129 (delta 394), reused 556 (delta 369), pack-reused 1519
Receiving objects: 100% (2129/2129), 372.54 KiB | 740.00 KiB/s, done.
Resolving deltas: 100% (1347/1347), done.
developer@e5529e95a909:/tmp$ cd libSGM/
developer@e5529e95a909:/tmp/libSGM$ ls sample/
benchmark image image_cv_gpumat movie reprojection zed
developer@e5529e95a909:/tmp/libSGM$ mkdir build && cd build
developer@e5529e95a909:/tmp/libSGM/build$ cmake .. -DENABLE_SAMPLES=on -DAUTO_DETECT_ARCH=off
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "9.2")
-- CUDA_ARCH: "-arch=sm_50"
-- Found OpenCV: /usr (found version "3.2.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/libSGM/build
developer@e5529e95a909:/tmp/libSGM/build$ make -j
[ 4%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_winner_takes_all.cu.o
[ 9%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_census_transform.cu.o
[ 13%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_path_aggregation.cu.o
[ 18%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_correct_disparity_range.cu.o
[ 22%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_sgm.cu.o
[ 27%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_vertical_path_aggregation.cu.o
[ 31%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_horizontal_path_aggregation.cu.o
[ 36%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_oblique_path_aggregation.cu.o
[ 45%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_cuda_utils.cu.o
[ 45%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_check_consistency.cu.o
[ 50%] Building NVCC (Device) object src/CMakeFiles/sgm.dir/sgm_generated_median_filter.cu.o
Scanning dependencies of target sgm
[ 59%] Building CXX object src/CMakeFiles/sgm.dir/libsgm_wrapper.cpp.o
[ 59%] Building CXX object src/CMakeFiles/sgm.dir/stereo_sgm.cpp.o
[ 63%] Linking CXX static library libsgm.a
[ 63%] Built target sgm
Scanning dependencies of target stereo_test
Scanning dependencies of target stereo_benchmark
Scanning dependencies of target stereo_movie
Scanning dependencies of target stereo_reprojection
[ 68%] Building CXX object sample/image/CMakeFiles/stereo_test.dir/stereosgm_image.cpp.o
[ 72%] Building CXX object sample/benchmark/CMakeFiles/stereo_benchmark.dir/stereosgm_benchmark.cpp.o
[ 81%] Building CXX object sample/movie/CMakeFiles/stereo_movie.dir/stereosgm_movie.cpp.o
[ 81%] Building CXX object sample/reprojection/CMakeFiles/stereo_reprojection.dir/stereosgm_reprojection.cpp.o
[ 86%] Linking CXX executable stereo_benchmark
[ 90%] Linking CXX executable stereo_test
[ 95%] Linking CXX executable stereo_movie
[100%] Linking CXX executable stereo_reprojection
[100%] Built target stereo_benchmark
[100%] Built target stereo_test
[100%] Built target stereo_movie
[100%] Built target stereo_reprojection
developer@e5529e95a909:/tmp/libSGM/build$ ls sample/
benchmark image movie reprojection
developer@e5529e95a909:/tmp/libSGM/build$
@ykitta-fixstars Thank you for your help. Actually the sample folder was not cloned. Now I am having issue with reading .png image. I get error when executing
~/libSGM/build/sample/image$ ./stereo_test /home/Downloads/seq05-img-left/image_%08d_0.png /home/Downloads/seq05-img-right/image_%08d_1.png It throws error **
imread failed** Wonder does it support other image format other than .pgm? I am on Ubuntu 16.04.