├── .gitignore ├── CMakeFiles ├── CMakeError.log ├── CMakeOutput.log ├── cmake.check_cache ├── feature_tests.bin ├── feature_tests.c └── feature_tests.cxx ├── CMakeLists.txt ├── README.md ├── compute_flow.cpp └── compute_flow_si_warp.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | *.smod 19 | 20 | # Compiled Static libraries 21 | *.lai 22 | *.la 23 | *.a 24 | *.lib 25 | 26 | # Executables 27 | *.exe 28 | *.out 29 | *.app 30 | -------------------------------------------------------------------------------- /CMakeFiles/CMakeError.log: -------------------------------------------------------------------------------- 1 | Determining if the pthread_create exist failed with the following output: 2 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 3 | 4 | Run Build Command:"/usr/bin/make" "cmTC_d0921/fast" 5 | /usr/bin/make -f CMakeFiles/cmTC_d0921.dir/build.make CMakeFiles/cmTC_d0921.dir/build 6 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 7 | Building C object CMakeFiles/cmTC_d0921.dir/CheckSymbolExists.c.o 8 | /usr/bin/cc -fPIC -o CMakeFiles/cmTC_d0921.dir/CheckSymbolExists.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp/CheckSymbolExists.c 9 | Linking C executable cmTC_d0921 10 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d0921.dir/link.txt --verbose=1 11 | /usr/bin/cc -fPIC CMakeFiles/cmTC_d0921.dir/CheckSymbolExists.c.o -o cmTC_d0921 -rdynamic 12 | CMakeFiles/cmTC_d0921.dir/CheckSymbolExists.c.o: In function `main': 13 | CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create' 14 | collect2: error: ld returned 1 exit status 15 | CMakeFiles/cmTC_d0921.dir/build.make:97: recipe for target 'cmTC_d0921' failed 16 | make[1]: *** [cmTC_d0921] Error 1 17 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 18 | Makefile:126: recipe for target 'cmTC_d0921/fast' failed 19 | make: *** [cmTC_d0921/fast] Error 2 20 | 21 | File /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp/CheckSymbolExists.c: 22 | /* */ 23 | #include 24 | 25 | int main(int argc, char** argv) 26 | { 27 | (void)argv; 28 | #ifndef pthread_create 29 | return ((int*)(&pthread_create))[argc]; 30 | #else 31 | (void)argc; 32 | return 0; 33 | #endif 34 | } 35 | 36 | Determining if the function pthread_create exists in the pthreads failed with the following output: 37 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 38 | 39 | Run Build Command:"/usr/bin/make" "cmTC_409f4/fast" 40 | /usr/bin/make -f CMakeFiles/cmTC_409f4.dir/build.make CMakeFiles/cmTC_409f4.dir/build 41 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 42 | Building C object CMakeFiles/cmTC_409f4.dir/CheckFunctionExists.c.o 43 | /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_409f4.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c 44 | Linking C executable cmTC_409f4 45 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_409f4.dir/link.txt --verbose=1 46 | /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_409f4.dir/CheckFunctionExists.c.o -o cmTC_409f4 -rdynamic -lpthreads 47 | /usr/bin/ld: cannot find -lpthreads 48 | collect2: error: ld returned 1 exit status 49 | CMakeFiles/cmTC_409f4.dir/build.make:97: recipe for target 'cmTC_409f4' failed 50 | make[1]: *** [cmTC_409f4] Error 1 51 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 52 | Makefile:126: recipe for target 'cmTC_409f4/fast' failed 53 | make: *** [cmTC_409f4/fast] Error 2 54 | 55 | 56 | -------------------------------------------------------------------------------- /CMakeFiles/CMakeOutput.log: -------------------------------------------------------------------------------- 1 | The system is: Linux - 4.13.0-37-generic - x86_64 2 | Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. 3 | Compiler: /usr/bin/cc 4 | Build flags: 5 | Id flags: 6 | 7 | The output was: 8 | 0 9 | 10 | 11 | Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" 12 | 13 | The C compiler identification is GNU, found in "/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/3.5.1/CompilerIdC/a.out" 14 | 15 | Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. 16 | Compiler: /usr/bin/c++ 17 | Build flags: 18 | Id flags: 19 | 20 | The output was: 21 | 0 22 | 23 | 24 | Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" 25 | 26 | The CXX compiler identification is GNU, found in "/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/3.5.1/CompilerIdCXX/a.out" 27 | 28 | Determining if the C compiler works passed with the following output: 29 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 30 | 31 | Run Build Command:"/usr/bin/make" "cmTC_b4164/fast" 32 | /usr/bin/make -f CMakeFiles/cmTC_b4164.dir/build.make CMakeFiles/cmTC_b4164.dir/build 33 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 34 | Building C object CMakeFiles/cmTC_b4164.dir/testCCompiler.c.o 35 | /usr/bin/cc -o CMakeFiles/cmTC_b4164.dir/testCCompiler.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp/testCCompiler.c 36 | Linking C executable cmTC_b4164 37 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b4164.dir/link.txt --verbose=1 38 | /usr/bin/cc CMakeFiles/cmTC_b4164.dir/testCCompiler.c.o -o cmTC_b4164 -rdynamic 39 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 40 | 41 | 42 | Detecting C compiler ABI info compiled with the following output: 43 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 44 | 45 | Run Build Command:"/usr/bin/make" "cmTC_1ed71/fast" 46 | /usr/bin/make -f CMakeFiles/cmTC_1ed71.dir/build.make CMakeFiles/cmTC_1ed71.dir/build 47 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 48 | Building C object CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o 49 | /usr/bin/cc -o CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c 50 | Linking C executable cmTC_1ed71 51 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1ed71.dir/link.txt --verbose=1 52 | /usr/bin/cc -v CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -o cmTC_1ed71 -rdynamic 53 | Using built-in specs. 54 | COLLECT_GCC=/usr/bin/cc 55 | COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 56 | Target: x86_64-linux-gnu 57 | Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 58 | Thread model: posix 59 | gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 60 | COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ 61 | LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ 62 | COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1ed71' '-rdynamic' '-mtune=generic' '-march=x86-64' 63 | /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccoTs6WP.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_1ed71 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o 64 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 65 | 66 | 67 | Parsed C implicit link information from above output: 68 | link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] 69 | ignore line: [Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp] 70 | ignore line: [] 71 | ignore line: [Run Build Command:"/usr/bin/make" "cmTC_1ed71/fast"] 72 | ignore line: [/usr/bin/make -f CMakeFiles/cmTC_1ed71.dir/build.make CMakeFiles/cmTC_1ed71.dir/build] 73 | ignore line: [make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp'] 74 | ignore line: [Building C object CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o] 75 | ignore line: [/usr/bin/cc -o CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c] 76 | ignore line: [Linking C executable cmTC_1ed71] 77 | ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1ed71.dir/link.txt --verbose=1] 78 | ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -o cmTC_1ed71 -rdynamic ] 79 | ignore line: [Using built-in specs.] 80 | ignore line: [COLLECT_GCC=/usr/bin/cc] 81 | ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] 82 | ignore line: [Target: x86_64-linux-gnu] 83 | ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] 84 | ignore line: [Thread model: posix] 85 | ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ] 86 | ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] 87 | ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] 88 | ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_1ed71' '-rdynamic' '-mtune=generic' '-march=x86-64'] 89 | link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccoTs6WP.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_1ed71 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] 90 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore 91 | arg [-plugin] ==> ignore 92 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore 93 | arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore 94 | arg [-plugin-opt=-fresolution=/tmp/ccoTs6WP.res] ==> ignore 95 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 96 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 97 | arg [-plugin-opt=-pass-through=-lc] ==> ignore 98 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 99 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 100 | arg [--sysroot=/] ==> ignore 101 | arg [--build-id] ==> ignore 102 | arg [--eh-frame-hdr] ==> ignore 103 | arg [-m] ==> ignore 104 | arg [elf_x86_64] ==> ignore 105 | arg [--hash-style=gnu] ==> ignore 106 | arg [--as-needed] ==> ignore 107 | arg [-export-dynamic] ==> ignore 108 | arg [-dynamic-linker] ==> ignore 109 | arg [/lib64/ld-linux-x86-64.so.2] ==> ignore 110 | arg [-zrelro] ==> ignore 111 | arg [-o] ==> ignore 112 | arg [cmTC_1ed71] ==> ignore 113 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore 114 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore 115 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore 116 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] 117 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] 118 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] 119 | arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] 120 | arg [-L/lib/../lib] ==> dir [/lib/../lib] 121 | arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] 122 | arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] 123 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] 124 | arg [CMakeFiles/cmTC_1ed71.dir/CMakeCCompilerABI.c.o] ==> ignore 125 | arg [-lgcc] ==> lib [gcc] 126 | arg [--as-needed] ==> ignore 127 | arg [-lgcc_s] ==> lib [gcc_s] 128 | arg [--no-as-needed] ==> ignore 129 | arg [-lc] ==> lib [c] 130 | arg [-lgcc] ==> lib [gcc] 131 | arg [--as-needed] ==> ignore 132 | arg [-lgcc_s] ==> lib [gcc_s] 133 | arg [--no-as-needed] ==> ignore 134 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore 135 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore 136 | remove lib [gcc] 137 | remove lib [gcc_s] 138 | remove lib [gcc] 139 | remove lib [gcc_s] 140 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] 141 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 142 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] 143 | collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] 144 | collapse library dir [/lib/../lib] ==> [/lib] 145 | collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 146 | collapse library dir [/usr/lib/../lib] ==> [/usr/lib] 147 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] 148 | implicit libs: [c] 149 | implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] 150 | implicit fwks: [] 151 | 152 | 153 | 154 | 155 | Detecting C [-std=c11] compiler features compiled with the following output: 156 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 157 | 158 | Run Build Command:"/usr/bin/make" "cmTC_f1a59/fast" 159 | /usr/bin/make -f CMakeFiles/cmTC_f1a59.dir/build.make CMakeFiles/cmTC_f1a59.dir/build 160 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 161 | Building C object CMakeFiles/cmTC_f1a59.dir/feature_tests.c.o 162 | /usr/bin/cc -std=c11 -o CMakeFiles/cmTC_f1a59.dir/feature_tests.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.c 163 | Linking C executable cmTC_f1a59 164 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f1a59.dir/link.txt --verbose=1 165 | /usr/bin/cc CMakeFiles/cmTC_f1a59.dir/feature_tests.c.o -o cmTC_f1a59 -rdynamic 166 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 167 | 168 | 169 | Feature record: C_FEATURE:1c_function_prototypes 170 | Feature record: C_FEATURE:1c_restrict 171 | Feature record: C_FEATURE:1c_static_assert 172 | Feature record: C_FEATURE:1c_variadic_macros 173 | 174 | 175 | Detecting C [-std=c99] compiler features compiled with the following output: 176 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 177 | 178 | Run Build Command:"/usr/bin/make" "cmTC_3a957/fast" 179 | /usr/bin/make -f CMakeFiles/cmTC_3a957.dir/build.make CMakeFiles/cmTC_3a957.dir/build 180 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 181 | Building C object CMakeFiles/cmTC_3a957.dir/feature_tests.c.o 182 | /usr/bin/cc -std=c99 -o CMakeFiles/cmTC_3a957.dir/feature_tests.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.c 183 | Linking C executable cmTC_3a957 184 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3a957.dir/link.txt --verbose=1 185 | /usr/bin/cc CMakeFiles/cmTC_3a957.dir/feature_tests.c.o -o cmTC_3a957 -rdynamic 186 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 187 | 188 | 189 | Feature record: C_FEATURE:1c_function_prototypes 190 | Feature record: C_FEATURE:1c_restrict 191 | Feature record: C_FEATURE:0c_static_assert 192 | Feature record: C_FEATURE:1c_variadic_macros 193 | 194 | 195 | Detecting C [-std=c90] compiler features compiled with the following output: 196 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 197 | 198 | Run Build Command:"/usr/bin/make" "cmTC_9bb4a/fast" 199 | /usr/bin/make -f CMakeFiles/cmTC_9bb4a.dir/build.make CMakeFiles/cmTC_9bb4a.dir/build 200 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 201 | Building C object CMakeFiles/cmTC_9bb4a.dir/feature_tests.c.o 202 | /usr/bin/cc -std=c90 -o CMakeFiles/cmTC_9bb4a.dir/feature_tests.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.c 203 | Linking C executable cmTC_9bb4a 204 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9bb4a.dir/link.txt --verbose=1 205 | /usr/bin/cc CMakeFiles/cmTC_9bb4a.dir/feature_tests.c.o -o cmTC_9bb4a -rdynamic 206 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 207 | 208 | 209 | Feature record: C_FEATURE:1c_function_prototypes 210 | Feature record: C_FEATURE:0c_restrict 211 | Feature record: C_FEATURE:0c_static_assert 212 | Feature record: C_FEATURE:0c_variadic_macros 213 | Determining if the CXX compiler works passed with the following output: 214 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 215 | 216 | Run Build Command:"/usr/bin/make" "cmTC_c4e9e/fast" 217 | /usr/bin/make -f CMakeFiles/cmTC_c4e9e.dir/build.make CMakeFiles/cmTC_c4e9e.dir/build 218 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 219 | Building CXX object CMakeFiles/cmTC_c4e9e.dir/testCXXCompiler.cxx.o 220 | /usr/bin/c++ -o CMakeFiles/cmTC_c4e9e.dir/testCXXCompiler.cxx.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp/testCXXCompiler.cxx 221 | Linking CXX executable cmTC_c4e9e 222 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c4e9e.dir/link.txt --verbose=1 223 | /usr/bin/c++ CMakeFiles/cmTC_c4e9e.dir/testCXXCompiler.cxx.o -o cmTC_c4e9e -rdynamic 224 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 225 | 226 | 227 | Detecting CXX compiler ABI info compiled with the following output: 228 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 229 | 230 | Run Build Command:"/usr/bin/make" "cmTC_56034/fast" 231 | /usr/bin/make -f CMakeFiles/cmTC_56034.dir/build.make CMakeFiles/cmTC_56034.dir/build 232 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 233 | Building CXX object CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o 234 | /usr/bin/c++ -o CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp 235 | Linking CXX executable cmTC_56034 236 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56034.dir/link.txt --verbose=1 237 | /usr/bin/c++ -v CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_56034 -rdynamic 238 | Using built-in specs. 239 | COLLECT_GCC=/usr/bin/c++ 240 | COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 241 | Target: x86_64-linux-gnu 242 | Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 243 | Thread model: posix 244 | gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 245 | COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ 246 | LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ 247 | COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_56034' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64' 248 | /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccV6VLJ4.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_56034 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o 249 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 250 | 251 | 252 | Parsed CXX implicit link information from above output: 253 | link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] 254 | ignore line: [Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp] 255 | ignore line: [] 256 | ignore line: [Run Build Command:"/usr/bin/make" "cmTC_56034/fast"] 257 | ignore line: [/usr/bin/make -f CMakeFiles/cmTC_56034.dir/build.make CMakeFiles/cmTC_56034.dir/build] 258 | ignore line: [make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp'] 259 | ignore line: [Building CXX object CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o] 260 | ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp] 261 | ignore line: [Linking CXX executable cmTC_56034] 262 | ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56034.dir/link.txt --verbose=1] 263 | ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_56034 -rdynamic ] 264 | ignore line: [Using built-in specs.] 265 | ignore line: [COLLECT_GCC=/usr/bin/c++] 266 | ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] 267 | ignore line: [Target: x86_64-linux-gnu] 268 | ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] 269 | ignore line: [Thread model: posix] 270 | ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ] 271 | ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] 272 | ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] 273 | ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_56034' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] 274 | link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccV6VLJ4.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_56034 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] 275 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore 276 | arg [-plugin] ==> ignore 277 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore 278 | arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore 279 | arg [-plugin-opt=-fresolution=/tmp/ccV6VLJ4.res] ==> ignore 280 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 281 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 282 | arg [-plugin-opt=-pass-through=-lc] ==> ignore 283 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 284 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 285 | arg [--sysroot=/] ==> ignore 286 | arg [--build-id] ==> ignore 287 | arg [--eh-frame-hdr] ==> ignore 288 | arg [-m] ==> ignore 289 | arg [elf_x86_64] ==> ignore 290 | arg [--hash-style=gnu] ==> ignore 291 | arg [--as-needed] ==> ignore 292 | arg [-export-dynamic] ==> ignore 293 | arg [-dynamic-linker] ==> ignore 294 | arg [/lib64/ld-linux-x86-64.so.2] ==> ignore 295 | arg [-zrelro] ==> ignore 296 | arg [-o] ==> ignore 297 | arg [cmTC_56034] ==> ignore 298 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore 299 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore 300 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore 301 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] 302 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] 303 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] 304 | arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] 305 | arg [-L/lib/../lib] ==> dir [/lib/../lib] 306 | arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] 307 | arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] 308 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] 309 | arg [CMakeFiles/cmTC_56034.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore 310 | arg [-lstdc++] ==> lib [stdc++] 311 | arg [-lm] ==> lib [m] 312 | arg [-lgcc_s] ==> lib [gcc_s] 313 | arg [-lgcc] ==> lib [gcc] 314 | arg [-lc] ==> lib [c] 315 | arg [-lgcc_s] ==> lib [gcc_s] 316 | arg [-lgcc] ==> lib [gcc] 317 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore 318 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore 319 | remove lib [gcc_s] 320 | remove lib [gcc] 321 | remove lib [gcc_s] 322 | remove lib [gcc] 323 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] 324 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 325 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] 326 | collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] 327 | collapse library dir [/lib/../lib] ==> [/lib] 328 | collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 329 | collapse library dir [/usr/lib/../lib] ==> [/usr/lib] 330 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] 331 | implicit libs: [stdc++;m;c] 332 | implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] 333 | implicit fwks: [] 334 | 335 | 336 | 337 | 338 | Detecting CXX [-std=c++14] compiler features compiled with the following output: 339 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 340 | 341 | Run Build Command:"/usr/bin/make" "cmTC_877d7/fast" 342 | /usr/bin/make -f CMakeFiles/cmTC_877d7.dir/build.make CMakeFiles/cmTC_877d7.dir/build 343 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 344 | Building CXX object CMakeFiles/cmTC_877d7.dir/feature_tests.cxx.o 345 | /usr/bin/c++ -std=c++14 -o CMakeFiles/cmTC_877d7.dir/feature_tests.cxx.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.cxx 346 | Linking CXX executable cmTC_877d7 347 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_877d7.dir/link.txt --verbose=1 348 | /usr/bin/c++ CMakeFiles/cmTC_877d7.dir/feature_tests.cxx.o -o cmTC_877d7 -rdynamic 349 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 350 | 351 | 352 | Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers 353 | Feature record: CXX_FEATURE:1cxx_alias_templates 354 | Feature record: CXX_FEATURE:1cxx_alignas 355 | Feature record: CXX_FEATURE:1cxx_alignof 356 | Feature record: CXX_FEATURE:1cxx_attributes 357 | Feature record: CXX_FEATURE:1cxx_attribute_deprecated 358 | Feature record: CXX_FEATURE:1cxx_auto_type 359 | Feature record: CXX_FEATURE:1cxx_binary_literals 360 | Feature record: CXX_FEATURE:1cxx_constexpr 361 | Feature record: CXX_FEATURE:1cxx_contextual_conversions 362 | Feature record: CXX_FEATURE:1cxx_decltype 363 | Feature record: CXX_FEATURE:1cxx_decltype_auto 364 | Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types 365 | Feature record: CXX_FEATURE:1cxx_default_function_template_args 366 | Feature record: CXX_FEATURE:1cxx_defaulted_functions 367 | Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers 368 | Feature record: CXX_FEATURE:1cxx_delegating_constructors 369 | Feature record: CXX_FEATURE:1cxx_deleted_functions 370 | Feature record: CXX_FEATURE:1cxx_digit_separators 371 | Feature record: CXX_FEATURE:1cxx_enum_forward_declarations 372 | Feature record: CXX_FEATURE:1cxx_explicit_conversions 373 | Feature record: CXX_FEATURE:1cxx_extended_friend_declarations 374 | Feature record: CXX_FEATURE:1cxx_extern_templates 375 | Feature record: CXX_FEATURE:1cxx_final 376 | Feature record: CXX_FEATURE:1cxx_func_identifier 377 | Feature record: CXX_FEATURE:1cxx_generalized_initializers 378 | Feature record: CXX_FEATURE:1cxx_generic_lambdas 379 | Feature record: CXX_FEATURE:1cxx_inheriting_constructors 380 | Feature record: CXX_FEATURE:1cxx_inline_namespaces 381 | Feature record: CXX_FEATURE:1cxx_lambdas 382 | Feature record: CXX_FEATURE:1cxx_lambda_init_captures 383 | Feature record: CXX_FEATURE:1cxx_local_type_template_args 384 | Feature record: CXX_FEATURE:1cxx_long_long_type 385 | Feature record: CXX_FEATURE:1cxx_noexcept 386 | Feature record: CXX_FEATURE:1cxx_nonstatic_member_init 387 | Feature record: CXX_FEATURE:1cxx_nullptr 388 | Feature record: CXX_FEATURE:1cxx_override 389 | Feature record: CXX_FEATURE:1cxx_range_for 390 | Feature record: CXX_FEATURE:1cxx_raw_string_literals 391 | Feature record: CXX_FEATURE:1cxx_reference_qualified_functions 392 | Feature record: CXX_FEATURE:1cxx_relaxed_constexpr 393 | Feature record: CXX_FEATURE:1cxx_return_type_deduction 394 | Feature record: CXX_FEATURE:1cxx_right_angle_brackets 395 | Feature record: CXX_FEATURE:1cxx_rvalue_references 396 | Feature record: CXX_FEATURE:1cxx_sizeof_member 397 | Feature record: CXX_FEATURE:1cxx_static_assert 398 | Feature record: CXX_FEATURE:1cxx_strong_enums 399 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 400 | Feature record: CXX_FEATURE:1cxx_thread_local 401 | Feature record: CXX_FEATURE:1cxx_trailing_return_types 402 | Feature record: CXX_FEATURE:1cxx_unicode_literals 403 | Feature record: CXX_FEATURE:1cxx_uniform_initialization 404 | Feature record: CXX_FEATURE:1cxx_unrestricted_unions 405 | Feature record: CXX_FEATURE:1cxx_user_literals 406 | Feature record: CXX_FEATURE:1cxx_variable_templates 407 | Feature record: CXX_FEATURE:1cxx_variadic_macros 408 | Feature record: CXX_FEATURE:1cxx_variadic_templates 409 | 410 | 411 | Detecting CXX [-std=c++11] compiler features compiled with the following output: 412 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 413 | 414 | Run Build Command:"/usr/bin/make" "cmTC_1b23c/fast" 415 | /usr/bin/make -f CMakeFiles/cmTC_1b23c.dir/build.make CMakeFiles/cmTC_1b23c.dir/build 416 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 417 | Building CXX object CMakeFiles/cmTC_1b23c.dir/feature_tests.cxx.o 418 | /usr/bin/c++ -std=c++11 -o CMakeFiles/cmTC_1b23c.dir/feature_tests.cxx.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.cxx 419 | Linking CXX executable cmTC_1b23c 420 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1b23c.dir/link.txt --verbose=1 421 | /usr/bin/c++ CMakeFiles/cmTC_1b23c.dir/feature_tests.cxx.o -o cmTC_1b23c -rdynamic 422 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 423 | 424 | 425 | Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers 426 | Feature record: CXX_FEATURE:1cxx_alias_templates 427 | Feature record: CXX_FEATURE:1cxx_alignas 428 | Feature record: CXX_FEATURE:1cxx_alignof 429 | Feature record: CXX_FEATURE:1cxx_attributes 430 | Feature record: CXX_FEATURE:0cxx_attribute_deprecated 431 | Feature record: CXX_FEATURE:1cxx_auto_type 432 | Feature record: CXX_FEATURE:0cxx_binary_literals 433 | Feature record: CXX_FEATURE:1cxx_constexpr 434 | Feature record: CXX_FEATURE:0cxx_contextual_conversions 435 | Feature record: CXX_FEATURE:1cxx_decltype 436 | Feature record: CXX_FEATURE:0cxx_decltype_auto 437 | Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types 438 | Feature record: CXX_FEATURE:1cxx_default_function_template_args 439 | Feature record: CXX_FEATURE:1cxx_defaulted_functions 440 | Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers 441 | Feature record: CXX_FEATURE:1cxx_delegating_constructors 442 | Feature record: CXX_FEATURE:1cxx_deleted_functions 443 | Feature record: CXX_FEATURE:0cxx_digit_separators 444 | Feature record: CXX_FEATURE:1cxx_enum_forward_declarations 445 | Feature record: CXX_FEATURE:1cxx_explicit_conversions 446 | Feature record: CXX_FEATURE:1cxx_extended_friend_declarations 447 | Feature record: CXX_FEATURE:1cxx_extern_templates 448 | Feature record: CXX_FEATURE:1cxx_final 449 | Feature record: CXX_FEATURE:1cxx_func_identifier 450 | Feature record: CXX_FEATURE:1cxx_generalized_initializers 451 | Feature record: CXX_FEATURE:0cxx_generic_lambdas 452 | Feature record: CXX_FEATURE:1cxx_inheriting_constructors 453 | Feature record: CXX_FEATURE:1cxx_inline_namespaces 454 | Feature record: CXX_FEATURE:1cxx_lambdas 455 | Feature record: CXX_FEATURE:0cxx_lambda_init_captures 456 | Feature record: CXX_FEATURE:1cxx_local_type_template_args 457 | Feature record: CXX_FEATURE:1cxx_long_long_type 458 | Feature record: CXX_FEATURE:1cxx_noexcept 459 | Feature record: CXX_FEATURE:1cxx_nonstatic_member_init 460 | Feature record: CXX_FEATURE:1cxx_nullptr 461 | Feature record: CXX_FEATURE:1cxx_override 462 | Feature record: CXX_FEATURE:1cxx_range_for 463 | Feature record: CXX_FEATURE:1cxx_raw_string_literals 464 | Feature record: CXX_FEATURE:1cxx_reference_qualified_functions 465 | Feature record: CXX_FEATURE:0cxx_relaxed_constexpr 466 | Feature record: CXX_FEATURE:0cxx_return_type_deduction 467 | Feature record: CXX_FEATURE:1cxx_right_angle_brackets 468 | Feature record: CXX_FEATURE:1cxx_rvalue_references 469 | Feature record: CXX_FEATURE:1cxx_sizeof_member 470 | Feature record: CXX_FEATURE:1cxx_static_assert 471 | Feature record: CXX_FEATURE:1cxx_strong_enums 472 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 473 | Feature record: CXX_FEATURE:1cxx_thread_local 474 | Feature record: CXX_FEATURE:1cxx_trailing_return_types 475 | Feature record: CXX_FEATURE:1cxx_unicode_literals 476 | Feature record: CXX_FEATURE:1cxx_uniform_initialization 477 | Feature record: CXX_FEATURE:1cxx_unrestricted_unions 478 | Feature record: CXX_FEATURE:1cxx_user_literals 479 | Feature record: CXX_FEATURE:0cxx_variable_templates 480 | Feature record: CXX_FEATURE:1cxx_variadic_macros 481 | Feature record: CXX_FEATURE:1cxx_variadic_templates 482 | 483 | 484 | Detecting CXX [-std=c++98] compiler features compiled with the following output: 485 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 486 | 487 | Run Build Command:"/usr/bin/make" "cmTC_3ba3d/fast" 488 | /usr/bin/make -f CMakeFiles/cmTC_3ba3d.dir/build.make CMakeFiles/cmTC_3ba3d.dir/build 489 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 490 | Building CXX object CMakeFiles/cmTC_3ba3d.dir/feature_tests.cxx.o 491 | /usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_3ba3d.dir/feature_tests.cxx.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/feature_tests.cxx 492 | Linking CXX executable cmTC_3ba3d 493 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3ba3d.dir/link.txt --verbose=1 494 | /usr/bin/c++ CMakeFiles/cmTC_3ba3d.dir/feature_tests.cxx.o -o cmTC_3ba3d -rdynamic 495 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 496 | 497 | 498 | Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers 499 | Feature record: CXX_FEATURE:0cxx_alias_templates 500 | Feature record: CXX_FEATURE:0cxx_alignas 501 | Feature record: CXX_FEATURE:0cxx_alignof 502 | Feature record: CXX_FEATURE:0cxx_attributes 503 | Feature record: CXX_FEATURE:0cxx_attribute_deprecated 504 | Feature record: CXX_FEATURE:0cxx_auto_type 505 | Feature record: CXX_FEATURE:0cxx_binary_literals 506 | Feature record: CXX_FEATURE:0cxx_constexpr 507 | Feature record: CXX_FEATURE:0cxx_contextual_conversions 508 | Feature record: CXX_FEATURE:0cxx_decltype 509 | Feature record: CXX_FEATURE:0cxx_decltype_auto 510 | Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types 511 | Feature record: CXX_FEATURE:0cxx_default_function_template_args 512 | Feature record: CXX_FEATURE:0cxx_defaulted_functions 513 | Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers 514 | Feature record: CXX_FEATURE:0cxx_delegating_constructors 515 | Feature record: CXX_FEATURE:0cxx_deleted_functions 516 | Feature record: CXX_FEATURE:0cxx_digit_separators 517 | Feature record: CXX_FEATURE:0cxx_enum_forward_declarations 518 | Feature record: CXX_FEATURE:0cxx_explicit_conversions 519 | Feature record: CXX_FEATURE:0cxx_extended_friend_declarations 520 | Feature record: CXX_FEATURE:0cxx_extern_templates 521 | Feature record: CXX_FEATURE:0cxx_final 522 | Feature record: CXX_FEATURE:0cxx_func_identifier 523 | Feature record: CXX_FEATURE:0cxx_generalized_initializers 524 | Feature record: CXX_FEATURE:0cxx_generic_lambdas 525 | Feature record: CXX_FEATURE:0cxx_inheriting_constructors 526 | Feature record: CXX_FEATURE:0cxx_inline_namespaces 527 | Feature record: CXX_FEATURE:0cxx_lambdas 528 | Feature record: CXX_FEATURE:0cxx_lambda_init_captures 529 | Feature record: CXX_FEATURE:0cxx_local_type_template_args 530 | Feature record: CXX_FEATURE:0cxx_long_long_type 531 | Feature record: CXX_FEATURE:0cxx_noexcept 532 | Feature record: CXX_FEATURE:0cxx_nonstatic_member_init 533 | Feature record: CXX_FEATURE:0cxx_nullptr 534 | Feature record: CXX_FEATURE:0cxx_override 535 | Feature record: CXX_FEATURE:0cxx_range_for 536 | Feature record: CXX_FEATURE:0cxx_raw_string_literals 537 | Feature record: CXX_FEATURE:0cxx_reference_qualified_functions 538 | Feature record: CXX_FEATURE:0cxx_relaxed_constexpr 539 | Feature record: CXX_FEATURE:0cxx_return_type_deduction 540 | Feature record: CXX_FEATURE:0cxx_right_angle_brackets 541 | Feature record: CXX_FEATURE:0cxx_rvalue_references 542 | Feature record: CXX_FEATURE:0cxx_sizeof_member 543 | Feature record: CXX_FEATURE:0cxx_static_assert 544 | Feature record: CXX_FEATURE:0cxx_strong_enums 545 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 546 | Feature record: CXX_FEATURE:0cxx_thread_local 547 | Feature record: CXX_FEATURE:0cxx_trailing_return_types 548 | Feature record: CXX_FEATURE:0cxx_unicode_literals 549 | Feature record: CXX_FEATURE:0cxx_uniform_initialization 550 | Feature record: CXX_FEATURE:0cxx_unrestricted_unions 551 | Feature record: CXX_FEATURE:0cxx_user_literals 552 | Feature record: CXX_FEATURE:0cxx_variable_templates 553 | Feature record: CXX_FEATURE:0cxx_variadic_macros 554 | Feature record: CXX_FEATURE:0cxx_variadic_templates 555 | Determining if the include file pthread.h exists passed with the following output: 556 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 557 | 558 | Run Build Command:"/usr/bin/make" "cmTC_8fecd/fast" 559 | /usr/bin/make -f CMakeFiles/cmTC_8fecd.dir/build.make CMakeFiles/cmTC_8fecd.dir/build 560 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 561 | Building C object CMakeFiles/cmTC_8fecd.dir/CheckIncludeFile.c.o 562 | /usr/bin/cc -fPIC -o CMakeFiles/cmTC_8fecd.dir/CheckIncludeFile.c.o -c /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp/CheckIncludeFile.c 563 | Linking C executable cmTC_8fecd 564 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8fecd.dir/link.txt --verbose=1 565 | /usr/bin/cc -fPIC CMakeFiles/cmTC_8fecd.dir/CheckIncludeFile.c.o -o cmTC_8fecd -rdynamic 566 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 567 | 568 | 569 | Determining if the function pthread_create exists in the pthread passed with the following output: 570 | Change Dir: /home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp 571 | 572 | Run Build Command:"/usr/bin/make" "cmTC_97515/fast" 573 | /usr/bin/make -f CMakeFiles/cmTC_97515.dir/build.make CMakeFiles/cmTC_97515.dir/build 574 | make[1]: Entering directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 575 | Building C object CMakeFiles/cmTC_97515.dir/CheckFunctionExists.c.o 576 | /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_97515.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c 577 | Linking C executable cmTC_97515 578 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_97515.dir/link.txt --verbose=1 579 | /usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_97515.dir/CheckFunctionExists.c.o -o cmTC_97515 -rdynamic -lpthread 580 | make[1]: Leaving directory '/home/pedro/ei3d/processing/gpu_flow/CMakeFiles/CMakeTmp' 581 | 582 | 583 | -------------------------------------------------------------------------------- /CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feichtenhofer/gpu_flow/5d5020a15f7c5d7a821bec7c5274c407f1974743/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.4) 2 | #set(OpenCV_DIR /home/pedro/opencv-3.1.0/build) 3 | # QT5 insert 4 | 5 | # Tell CMake to run moc when necessary: 6 | set(CMAKE_AUTOMOC ON) 7 | # As moc files are generated in the binary dir, tell CMake 8 | # to always look for includes there: 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | 11 | # Widgets finds its own dependencies (QtGui and QtCore). 12 | find_package(Qt5Widgets REQUIRED) 13 | 14 | # The Qt5Widgets_INCLUDES also includes the include directories for 15 | # dependencies QtCore and QtGui 16 | include_directories(${Qt5Widgets_INCLUDES}) 17 | 18 | # We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5. 19 | add_definitions(${Qt5Widgets_DEFINITIONS}) 20 | 21 | # Executables fail to build with Qt 5 in the default configuration 22 | # without -fPIE. We add that here. 23 | set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") 24 | 25 | # OpenCV Config 26 | SET(OpenCV_DIR "/home/pedro/opencv-2.4.13.6/build") 27 | find_package( OpenCV REQUIRED ) 28 | set(OpenCV_FOUND 1) 29 | message(STATUS " version: ${OpenCV_VERSION}") 30 | message("-- OPENCV include: " ${OpenCV_INCLUDE_DIRS}) 31 | message("-- OPENCV libs dir: " ${OpenCV_LIB_DIR}) 32 | message("-- OPENCV libs: " ${OpenCV_LIBS} ) 33 | 34 | INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) 35 | LINK_DIRECTORIES(${OpenCV_LIB_DIR}) 36 | 37 | ADD_DEFINITIONS(-DDEBUG -ggdb -O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fbranch-probabilities) 38 | 39 | if(COMMAND cmake_policy) 40 | cmake_policy(SET CMP0003 NEW) 41 | endif(COMMAND cmake_policy) 42 | 43 | ################################ 44 | 45 | option(WARP ON) 46 | if(WARP) 47 | ADD_EXECUTABLE( 48 | compute_flow_si_warp 49 | compute_flow_si_warp.cpp 50 | ${SRCS} 51 | ) 52 | 53 | TARGET_LINK_LIBRARIES( 54 | compute_flow_si_warp 55 | ${OPENCV_LIBRARIES} 56 | ${OpenCV_LIBS} 57 | ${Qt5Widgets_LIBRARIES} 58 | ) 59 | else() 60 | ADD_EXECUTABLE( 61 | compute_flow 62 | compute_flow.cpp 63 | ${SRCS} 64 | ) 65 | 66 | TARGET_LINK_LIBRARIES( 67 | compute_flow 68 | ${OPENCV_LIBRARIES} 69 | ${OpenCV_LIBS} 70 | ${Qt5Widgets_LIBRARIES} 71 | ) 72 | endif() 73 | ################################ 74 | 75 | foreach(dir ${DIRS}) 76 | FILE(GLOB files ${dir}/*.h*) 77 | LIST(APPEND h_files ${files}) 78 | endforeach(dir) 79 | add_custom_target(TAGS etags --members -l c++ ${h_files} ${SRCS}) 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | GPU based optical flow extraction in OpenCV 2 | ==================== 3 | ### Features: 4 | * OpenCV wrapper for Real-Time optical flow extraction on GPU 5 | * Automatic directory handling using Qt 6 | * Allows saving of optical flow to disk, 7 | ** either with clipping large displacements 8 | ** or by adaptively scaling the displacements to the radiometric resolution of the output image 9 | 10 | ### Dependencies 11 | * [OpenCV 2.4] (http://opencv.org/downloads.html) (if you want OpenCV 3.1, tell me, I'll do the port) 12 | * [Qt 5.4] (https://www.qt.io/qt5-4/) 13 | * [cmake] (https://cmake.org/) 14 | 15 | ### Installation 16 | 1. `mkdir -p build` 17 | 2. `cd build` 18 | 3. `cmake ..` 19 | 4. `make` 20 | 21 | ### Configuration: 22 | You should adjust the input and output directories by passing in `vid_path` and `out_path`. Note that vid_path must exist, Qt will create out_path. Use -h option t for more. 23 | In the CMakeLists.txt there is an option called WARP. This selects if you want warped optical flow or not. The warped optical flow file also outputs optical flows as a single BGR image (red is the flow magnitude). In the compute_flow_si_warp file itself there is a warp variable that you can set to false to just compute normal flow. If you want grayscale for images (x and y) use compute_flow. 24 | 25 | ### Usage: 26 | ``` 27 | ./compute_flow [OPTION]... 28 | ``` 29 | ``` 30 | ./compute_flow_si_warp [OPTION] .. 31 | ``` 32 | 33 | Available options: 34 | * `start_video`: start with video number in `vid_path` directory structure [1] 35 | * `gpuID`: use this GPU ID [0] 36 | * `type`: use this flow method Brox = 0, TVL1 = 1 [1] 37 | * `skip`: the number of frames that are skipped between flow calcuation [1] 38 | * `vid_path`: folder with input videos 39 | * `out_path`: folder where a folder per video containing optical flow frames will be created 40 | 41 | Additional features in `compute_flow.cpp`: 42 | * `float MIN_SZ = 256`: defines the smallest side of the frame for optical flow computation 43 | * `float OUT_SZ = 256`: defines the smallest side of the frame for saving as .jpeg 44 | * `bool clipFlow = true;`: defines whether to clip the optical flow larger than [-20 20] pixels and maps the interval [-20 20] to [0 255] in grayscale image space. If no clipping is performed the mapping to the image space is achieved by finding the frame-wise minimum and maximum displacement and mapping to [0 255] via an adaptive scaling, where the scale factors are saved as a binary file to `out_path`. 45 | 46 | ### Example: 47 | ``` 48 | ./compute_flow --gpuID=0 --type=1 --vid_path=test --vid_path=test_out --stride=2 49 | ``` 50 | 51 | 52 | -------------------------------------------------------------------------------- /compute_flow.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // compute_flow.cpp 3 | // Computes OpenCV GPU Brox et al. [1] and Zach et al. [2] TVL1 Optical Flow 4 | // Dependencies: OpenCV and Qt5 for iterating (sub)directories 5 | // Author: Christoph Feichtenhofer 6 | // Institution: Graz University of Technology 7 | // Email: feichtenhofer@tugraz 8 | // Date: Nov. 2015 9 | // [1] T. Brox, A. Bruhn, N. Papenberg, J. Weickert. High accuracy optical flow estimation based on a theory for warping. ECCV 2004. 10 | // [2] C. Zach, T. Pock, H. Bischof: A duality based approach for realtime TV-L 1 optical flow. DAGM 2007. 11 | //************************************************************************ 12 | 13 | #define N_CHAR 500 14 | #define WRITEOUT_IMGS 1 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include "opencv2/video/tracking.hpp" 35 | #include "opencv2/imgproc/imgproc.hpp" 36 | #include "opencv2/highgui/highgui.hpp" 37 | #include "opencv2/gpu/gpu.hpp" 38 | 39 | #include 40 | 41 | using namespace std; 42 | using namespace cv; 43 | using namespace cv::gpu; 44 | 45 | float MIN_SZ = 256; 46 | float OUT_SZ = 256; 47 | 48 | bool clipFlow = true; // clips flow to [-20 20] 49 | bool resize_img = true; 50 | 51 | // These are default paths 52 | 53 | std::string vid_path = "/home/pedro/gpu_flow/avis/"; 54 | 55 | std::string out_path = "/home/pedro/gpu_flow/tvl1_flow/"; 56 | std::string out_path_jpeg = "/home/pedro/gpu_flow/rgb/"; 57 | 58 | bool createOutDirs = true; 59 | 60 | /* THESE ARE MY PARAMS, NOT FEICHENHOFER'S */ 61 | 62 | bool debug = false; 63 | bool rgb = false; 64 | bool bins = false; 65 | 66 | // Global variables for gpu::BroxOpticalFlow 67 | const float alpha_ = 0.197; 68 | const float gamma_ = 50; 69 | const float scale_factor_ = 0.8; 70 | const int inner_iterations_ = 10; 71 | const int outer_iterations_ = 77; 72 | const int solver_iterations_ = 10; 73 | 74 | const int RESIZE_WIDTH = 224; 75 | const int RESIZE_HEIGHT = 224; 76 | const bool warp = false; 77 | 78 | void converFlowMat(Mat& flowIn, Mat& flowOut,float min_range_, float max_range_) 79 | { 80 | float value = 0.0f; 81 | for(int i = 0; i < flowIn.rows; i++) 82 | { 83 | float* Di = flowIn.ptr(i); 84 | char* Ii = flowOut.ptr(i); 85 | for(int j = 0; j < flowIn.cols; j++) 86 | { 87 | value = (Di[j]-min_range_)/(max_range_-min_range_); 88 | 89 | value *= 255; 90 | value = cvRound(value); 91 | 92 | Ii[j] = (char) value; 93 | } 94 | } 95 | } 96 | 97 | static void convertFlowToImage(const Mat &flowIn, Mat &flowOut, 98 | float lowerBound, float higherBound) { 99 | #define CAST(v, L, H) ((v) > (H) ? 255 : (v) < (L) ? 0 : cvRound(255*((v) - (L))/((H)-(L)))) 100 | for (int i = 0; i < flowIn.rows; ++i) { 101 | for (int j = 0; j < flowIn.cols; ++j) { 102 | float x = flowIn.at(i,j); 103 | flowOut.at(i,j) = CAST(x, lowerBound, higherBound); 104 | } 105 | } 106 | #undef CAST 107 | } 108 | 109 | int main( int argc, char *argv[] ) 110 | { 111 | GpuMat frame0GPU, frame1GPU, uGPU, vGPU; 112 | Mat frame0_rgb_, frame1_rgb_, frame0_rgb, frame1_rgb, frame0, frame1, rgb_out; 113 | Mat frame0_32, frame1_32, imgU, imgV; 114 | Mat motion_flow, flow_rgb; 115 | 116 | char cad[N_CHAR]; 117 | struct timeval tod1; 118 | double t1 = 0.0, t2 = 0.0, tdflow = 0.0, t1fr = 0.0, t2fr = 0.0, tdframe = 0.0; 119 | 120 | int start_with_vid = 1; 121 | int gpuID = 0; 122 | int type = 1; 123 | int frameSkip = 1; 124 | 125 | 126 | int vidcount = 0; 127 | 128 | const char* keys = "{ h | help | false | print help message }" 129 | "{ v | start_video | 1 | start video id }" 130 | "{ g | gpuID | 1 | use this gpu}" 131 | "{ f | type | 1 | use this flow method (0=Brox, 1=TV-L1)}" 132 | "{ s | skip | 1 | frame skip}" 133 | "{ vp | vid_path | ./ | path input (where the videos are)}" 134 | "{ op | out_path | ./ | path output}"; 135 | 136 | CommandLineParser cmd(argc, argv, keys); 137 | 138 | if (cmd.get("help")) 139 | { 140 | cout << "Usage: compute_flow [options]" << endl; 141 | cout << "Avaible options:" << endl; 142 | cmd.printParams(); 143 | return 0; 144 | } 145 | 146 | if (argc > 1) { 147 | start_with_vid = cmd.get("start_video"); 148 | gpuID = cmd.get("gpuID"); 149 | type = cmd.get("type"); 150 | frameSkip = cmd.get("skip"); 151 | vid_path = cmd.get("vid_path"); 152 | out_path = cmd.get("out_path"); 153 | out_path_jpeg = out_path + "/rgb/"; 154 | cout << "start_vid:" << start_with_vid << "gpuID:" << gpuID << "flow method: "<< type << " frameSkip: " << frameSkip << " vid_path: " << vid_path << " out_path" << out_path << " jpegs: " << out_path_jpeg << endl; 155 | } 156 | 157 | int totalvideos = 0; 158 | DIR * dirp; 159 | struct dirent * entry; 160 | 161 | dirp = opendir(vid_path.c_str()); /* There should be error handling after this */ 162 | while ((entry = readdir(dirp)) != NULL) { 163 | if (entry->d_type == DT_REG) { /* If the entry is a regular file */ 164 | totalvideos++; 165 | } 166 | } 167 | closedir(dirp); 168 | 169 | cv::gpu::setDevice(gpuID); 170 | Mat capture_frame, capture_image, prev_image, capture_gray, prev_gray, human_mask; 171 | 172 | 173 | cv::gpu::printShortCudaDeviceInfo(cv::gpu::getDevice()); 174 | 175 | cv::gpu::BroxOpticalFlow dflow(alpha_,gamma_,scale_factor_,inner_iterations_,outer_iterations_,solver_iterations_); 176 | 177 | cv::gpu::OpticalFlowDual_TVL1_GPU alg_tvl1; 178 | 179 | QString vpath = QString::fromStdString(vid_path); 180 | QStringList filters; 181 | 182 | QDirIterator dirIt(vpath, QDirIterator::Subdirectories); 183 | 184 | 185 | int vidID = 0; 186 | std::string video, outfile_u, outfile_v, outfile_jpeg; 187 | 188 | for (; (dirIt.hasNext()); ) 189 | { 190 | //std::cout << "asdf "<< std::endl; 191 | dirIt.next(); 192 | QString file = dirIt.fileName(); 193 | if ((QFileInfo(dirIt.filePath()).suffix() == "mp4") || (QFileInfo(dirIt.filePath()).suffix() == "avi")) 194 | { 195 | video = dirIt.filePath().toStdString(); 196 | } 197 | 198 | else 199 | continue; 200 | 201 | vidID++; 202 | 203 | if (vidID < start_with_vid) 204 | continue; 205 | 206 | 207 | std::string fName(video); 208 | std::string path(video); 209 | size_t last_slash_idx = std::string::npos; 210 | if (!createOutDirs) 211 | { 212 | // Remove directory if present. 213 | // Do this before extension removal incase directory has a period character. 214 | std::cout << "removing directories: " << fName << std::endl; 215 | last_slash_idx = fName.find_last_of("\\/"); 216 | if (std::string::npos != last_slash_idx) 217 | { 218 | fName.erase(0, last_slash_idx + 1); 219 | path.erase(last_slash_idx + 1, path.length()); 220 | } 221 | } 222 | else 223 | { 224 | last_slash_idx = fName.find(vid_path); 225 | fName.erase(0, vid_path.length()); 226 | path.erase(vid_path.length(), path.length()); 227 | } 228 | 229 | // Remove extension if present. 230 | const size_t period_idx = fName.rfind('.'); 231 | if (std::string::npos != period_idx) 232 | fName.erase(period_idx); 233 | 234 | QString out_folder_u = QString::fromStdString(out_path + "x/" + fName); 235 | 236 | bool folder_exists = QDir(out_folder_u).exists(); 237 | 238 | if (folder_exists) { 239 | std::cout << "already exists: " << out_path << fName << std::endl; 240 | continue; 241 | } 242 | 243 | bool folder_created = QDir().mkpath(out_folder_u); 244 | if (!folder_created) { 245 | std::cout << "cannot create: " << out_path << fName << std::endl; 246 | continue; 247 | } 248 | 249 | QString out_folder_v = QString::fromStdString(out_path + "y/" + fName); 250 | QDir().mkpath(out_folder_v); 251 | if(rgb){ 252 | QString out_folder_jpeg = QString::fromStdString(out_path_jpeg + fName); 253 | QDir().mkpath(out_folder_jpeg); 254 | outfile_jpeg = out_folder_jpeg.toStdString(); 255 | } 256 | 257 | // Create a separate folder for the .bins 258 | FILE *fx = NULL; 259 | if (bins == true){ 260 | QString out_folder_bins = QString::fromStdString(out_path + "bins/" + fName); 261 | QDir().mkpath(out_folder_bins); 262 | std::string outfile = out_path + "bins/" + fName + ".bin"; 263 | FILE *fx = fopen(outfile.c_str(),"wb"); 264 | } 265 | 266 | 267 | //if(debug){ 268 | std::cout << video << " " << vidcount << "/" << totalvideos << std::endl; 269 | //} 270 | vidcount++; 271 | 272 | VideoCapture cap; 273 | try 274 | { 275 | cap.open(video); 276 | } 277 | catch (std::exception& e) 278 | { 279 | std::cout << e.what() << '\n'; 280 | } 281 | 282 | int nframes = 0, width = 0, height = 0, width_out = 0, height_out = 0; 283 | float factor = 0, factor_out = 0; 284 | 285 | if( cap.isOpened() == 0 ) 286 | { 287 | return -1; 288 | } 289 | 290 | cap >> frame1_rgb_; 291 | 292 | if( resize_img == true ) 293 | { 294 | factor = std::max(MIN_SZ/frame1_rgb_.cols, MIN_SZ/frame1_rgb_.rows); 295 | 296 | width = std::floor(frame1_rgb_.cols*factor); 297 | width -= width%2; 298 | height = std::floor(frame1_rgb_.rows*factor); 299 | height -= height%2; 300 | 301 | frame1_rgb = cv::Mat(Size(width,height),CV_8UC3); 302 | width = frame1_rgb.cols; 303 | height = frame1_rgb.rows; 304 | cv::resize(frame1_rgb_,frame1_rgb,cv::Size(224,224),0,0,INTER_CUBIC); 305 | 306 | factor_out = std::max(OUT_SZ/width, OUT_SZ/height); 307 | 308 | rgb_out = cv::Mat(Size(cvRound(width*factor_out),cvRound(height*factor_out)),CV_8UC3); 309 | width_out = rgb_out.cols; 310 | height_out = rgb_out.rows; 311 | } 312 | else 313 | { 314 | frame1_rgb = cv::Mat(Size(frame1_rgb_.cols,frame1_rgb_.rows),CV_8UC3); 315 | width = frame1_rgb.cols; 316 | height = frame1_rgb.rows; 317 | frame1_rgb_.copyTo(frame1_rgb); 318 | } 319 | 320 | // Allocate memory for the images 321 | frame0_rgb = cv::Mat(Size(width,height),CV_8UC3); 322 | flow_rgb = cv::Mat(Size(width,height),CV_8UC3); 323 | motion_flow = cv::Mat(Size(width,height),CV_8UC3); 324 | frame0 = cv::Mat(Size(width,height),CV_8UC1); 325 | frame1 = cv::Mat(Size(width,height),CV_8UC1); 326 | frame0_32 = cv::Mat(Size(width,height),CV_32FC1); 327 | frame1_32 = cv::Mat(Size(width,height),CV_32FC1); 328 | 329 | // Convert the image to grey and float 330 | cvtColor(frame1_rgb,frame1,CV_BGR2GRAY); 331 | frame1.convertTo(frame1_32,CV_32FC1,1.0/255.0,0); 332 | 333 | outfile_u = out_folder_u.toStdString(); 334 | outfile_v = out_folder_v.toStdString(); 335 | 336 | 337 | while( frame1.empty() == false ) 338 | { 339 | gettimeofday(&tod1,NULL); 340 | t1fr = tod1.tv_sec + tod1.tv_usec / 1000000.0; 341 | if( nframes >= 1 ) 342 | { 343 | gettimeofday(&tod1,NULL); 344 | // GetSystemTime(&tod1); 345 | t1 = tod1.tv_sec + tod1.tv_usec / 1000000.0; 346 | switch(type){ 347 | case 0: 348 | frame1GPU.upload(frame1_32); 349 | frame0GPU.upload(frame0_32); 350 | dflow(frame0GPU,frame1GPU,uGPU,vGPU); 351 | case 1: 352 | frame1GPU.upload(frame1); 353 | frame0GPU.upload(frame0); 354 | alg_tvl1(frame0GPU,frame1GPU,uGPU,vGPU); 355 | } 356 | 357 | uGPU.download(imgU); 358 | vGPU.download(imgV); 359 | 360 | gettimeofday(&tod1,NULL); 361 | t2 = tod1.tv_sec + tod1.tv_usec / 1000000.0; 362 | tdflow = 1000.0*(t2-t1); 363 | 364 | } 365 | 366 | if( WRITEOUT_IMGS == true && nframes >= 1 ) 367 | { 368 | if( resize_img == true ) 369 | { 370 | 371 | cv::resize(imgU,imgU,cv::Size(224,224),0,0,INTER_CUBIC); 372 | cv::resize(imgV,imgV,cv::Size(224,224),0,0,INTER_CUBIC); 373 | 374 | } 375 | 376 | 377 | double min_u, max_u; 378 | cv::minMaxLoc(imgU, &min_u, &max_u); 379 | double min_v, max_v; 380 | cv::minMaxLoc(imgV, &min_v, &max_v); 381 | 382 | 383 | float min_u_f = min_u; 384 | float max_u_f = max_u; 385 | 386 | float min_v_f = min_v; 387 | float max_v_f = max_v; 388 | 389 | if (clipFlow) { 390 | min_u_f = -20; 391 | max_u_f = 20; 392 | 393 | min_v_f = -20; 394 | max_v_f = 20; 395 | } 396 | 397 | cv::Mat img_u(imgU.rows, imgU.cols, CV_8UC1); 398 | cv::Mat img_v(imgV.rows, imgV.cols, CV_8UC1); 399 | 400 | 401 | convertFlowToImage(imgU, img_u, min_u_f, max_u_f); 402 | convertFlowToImage(imgV, img_v, min_v_f, max_v_f); 403 | 404 | sprintf(cad,"/frame%06d.jpg",nframes); 405 | 406 | imwrite(outfile_u+cad,img_u); 407 | imwrite(outfile_v+cad,img_v); 408 | if (bins == true){ 409 | fwrite(&min_u_f,sizeof(float),1,fx); 410 | fwrite(&max_u_f,sizeof(float),1,fx); 411 | fwrite(&min_v_f,sizeof(float),1,fx); 412 | fwrite(&max_v_f,sizeof(float),1,fx); 413 | } 414 | } 415 | 416 | sprintf(cad,"/frame%06d.jpg",nframes + 1); 417 | if(rgb){ 418 | if( resize_img == true ) 419 | { 420 | cv::resize(frame1_rgb,rgb_out,cv::Size(224,224),0,0,INTER_CUBIC); 421 | imwrite(outfile_jpeg+cad,rgb_out); 422 | } 423 | else 424 | imwrite(outfile_jpeg+cad,frame1_rgb); 425 | } 426 | if(debug){ 427 | std::cout << "writing:" << outfile_jpeg+cad << std::endl; 428 | } 429 | frame1_rgb.copyTo(frame0_rgb); 430 | cvtColor(frame0_rgb,frame0,CV_BGR2GRAY); 431 | frame0.convertTo(frame0_32,CV_32FC1,1.0/255.0,0); 432 | 433 | nframes++; 434 | for (int iskip = 0; iskip> frame1_rgb_; 437 | } 438 | if( frame1_rgb_.empty() == false ) 439 | { 440 | if( resize_img == true ) 441 | { 442 | cv::resize(frame1_rgb_,frame1_rgb,cv::Size(224,224),0,0,INTER_CUBIC); 443 | } 444 | else 445 | { 446 | frame1_rgb_.copyTo(frame1_rgb); 447 | } 448 | 449 | cvtColor(frame1_rgb,frame1,CV_BGR2GRAY); 450 | frame1.convertTo(frame1_32,CV_32FC1,1.0/255.0,0); 451 | } 452 | else 453 | { 454 | break; 455 | } 456 | 457 | gettimeofday(&tod1,NULL); 458 | if(debug){ 459 | t2fr = tod1.tv_sec + tod1.tv_usec / 1000000.0; 460 | tdframe = 1000.0*(t2fr-t1fr); 461 | cout << "Processing video" << fName << "ID="<< vidID << " Frame Number: " << nframes << endl; 462 | cout << "Time type=" << type << " Flow: " << tdflow << " ms" << endl; 463 | cout << "Time All: " << tdframe << " ms" << endl; 464 | } 465 | 466 | } 467 | if (bins == true){ 468 | fclose(fx); 469 | } 470 | } 471 | 472 | return 0; 473 | } 474 | -------------------------------------------------------------------------------- /compute_flow_si_warp.cpp: -------------------------------------------------------------------------------- 1 | //************************************************************************ 2 | // compute_flow.cpp 3 | // Computes OpenCV GPU Brox et al. [1] and Zach et al. [2] TVL1 Optical Flow 4 | // Dependencies: OpenCV and Qt5 for iterating (sub)directories 5 | // Author: Christoph Feichtenhofer 6 | // Institution: Graz University of Technology 7 | // Email: feichtenhofer@tugraz 8 | // Date: Nov. 2015 9 | // [1] T. Brox, A. Bruhn, N. Papenberg, J. Weickert. High accuracy optical flow estimation based on a theory for warping. ECCV 2004. 10 | // [2] C. Zach, T. Pock, H. Bischof: A duality based approach for realtime TV-L 1 optical flow. DAGM 2007. 11 | //************************************************************************ 12 | 13 | #define N_CHAR 500 14 | #define WRITEOUT_IMGS 1 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include "opencv2/video/tracking.hpp" 35 | #include "opencv2/imgproc/imgproc.hpp" 36 | #include "opencv2/highgui/highgui.hpp" 37 | #include "opencv2/gpu/gpu.hpp" 38 | 39 | // These are required for warp flow 40 | #include "opencv2/calib3d/calib3d.hpp" 41 | #include "opencv2/features2d/features2d.hpp" 42 | #include "opencv2/xfeatures2d.hpp" 43 | // Some surf stuff in this one below 44 | #include "opencv2/nonfree/features2d.hpp" 45 | //#include "opencv2/cudaarithm.hpp" 46 | /*#include "opencv2/cudaoptflow.hpp"* 47 | #include "opencv2/cudacodec.hpp"*/ 48 | 49 | #include 50 | //#include "warp_flow.h" 51 | 52 | using namespace std; 53 | using namespace cv; 54 | using namespace cv::gpu; 55 | 56 | float MIN_SZ = 256; 57 | float OUT_SZ = 256; 58 | 59 | bool clipFlow = true; // clips flow to [-20 20] 60 | bool resize_img = true; 61 | 62 | // These are default paths if nothing is passed 63 | std::string vid_path = "/home/pedro/gpu_flow/avis/"; 64 | std::string out_path = "/home/pedro/gpu_flow/tvl1_flow/"; 65 | std::string out_path_jpeg = "/home/pedro/gpu_flow/rgb/"; 66 | 67 | bool createOutDirs = true; 68 | 69 | /* THESE ARE MY PARAMS, NOT FEICHENHOFER'S */ 70 | 71 | bool debug = false; 72 | bool rgb = false; 73 | bool bins = false; 74 | 75 | // Global variables for gpu::BroxOpticalFlow 76 | const float alpha_ = 0.197; 77 | const float gamma_ = 50; 78 | const float scale_factor_ = 0.8; 79 | const int inner_iterations_ = 10; 80 | const int outer_iterations_ = 77; 81 | const int solver_iterations_ = 10; 82 | 83 | const bool warp = true; 84 | 85 | inline void initializeMats(const Mat& frame, 86 | Mat& capture_image, Mat& capture_gray, 87 | Mat& prev_image, Mat& prev_gray){ 88 | capture_image.create(frame.size(), CV_8UC3); 89 | capture_gray.create(frame.size(), CV_8UC1); 90 | 91 | prev_image.create(frame.size(), CV_8UC3); 92 | prev_gray.create(frame.size(), CV_8UC1); 93 | } 94 | 95 | /* 96 | 97 | cv::Mat windowedMatchingMask( const std::vector& keypoints1, const std::vector& keypoints2, 98 | float maxDeltaX, float maxDeltaY ) 99 | { 100 | if( keypoints1.empty() || keypoints2.empty() ) 101 | return cv::Mat(); 102 | 103 | int n1 = (int)keypoints1.size(), n2 = (int)keypoints2.size(); 104 | cv::Mat mask( n1, n2, CV_8UC1 ); 105 | for( int i = 0; i < n1; i++ ) 106 | { 107 | for( int j = 0; j < n2; j++ ) 108 | { 109 | cv::Point2f diff = keypoints2[j].pt - keypoints1[i].pt; 110 | mask.at(i, j) = std::abs(diff.x) < maxDeltaX && std::abs(diff.y) < maxDeltaY; 111 | } 112 | } 113 | return mask; 114 | } 115 | */ 116 | 117 | 118 | void MyWarpPerspective(Mat& prev_src, Mat& src, Mat& dst, Mat& M0, int flags=INTER_LINEAR, 119 | int borderType=BORDER_CONSTANT, const Scalar& borderValue=Scalar()) 120 | { 121 | int width = src.cols; 122 | int height = src.rows; 123 | dst.create( height, width, CV_8UC1 ); 124 | 125 | Mat mask = Mat::zeros(height, width, CV_8UC1); 126 | const int margin = 5; 127 | 128 | const int BLOCK_SZ = 32; 129 | short XY[BLOCK_SZ*BLOCK_SZ*2], A[BLOCK_SZ*BLOCK_SZ]; 130 | 131 | int interpolation = flags & INTER_MAX; 132 | if( interpolation == INTER_AREA ) 133 | interpolation = INTER_LINEAR; 134 | 135 | double M[9]; 136 | Mat matM(3, 3, CV_64F, M); 137 | M0.convertTo(matM, matM.type()); 138 | if( !(flags & WARP_INVERSE_MAP) ) 139 | invert(matM, matM); 140 | 141 | int x, y, x1, y1; 142 | 143 | int bh0 = min(BLOCK_SZ/2, height); 144 | int bw0 = min(BLOCK_SZ*BLOCK_SZ/bh0, width); 145 | bh0 = min(BLOCK_SZ*BLOCK_SZ/bw0, height); 146 | 147 | for( y = 0; y < height; y += bh0 ) { 148 | for( x = 0; x < width; x += bw0 ) { 149 | int bw = min( bw0, width - x); 150 | int bh = min( bh0, height - y); 151 | 152 | Mat _XY(bh, bw, CV_16SC2, XY); 153 | Mat matA; 154 | Mat dpart(dst, Rect(x, y, bw, bh)); 155 | 156 | for( y1 = 0; y1 < bh; y1++ ) { 157 | 158 | short* xy = XY + y1*bw*2; 159 | double X0 = M[0]*x + M[1]*(y + y1) + M[2]; 160 | double Y0 = M[3]*x + M[4]*(y + y1) + M[5]; 161 | double W0 = M[6]*x + M[7]*(y + y1) + M[8]; 162 | short* alpha = A + y1*bw; 163 | 164 | for( x1 = 0; x1 < bw; x1++ ) { 165 | 166 | double W = W0 + M[6]*x1; 167 | W = W ? INTER_TAB_SIZE/W : 0; 168 | double fX = max((double)INT_MIN, min((double)INT_MAX, (X0 + M[0]*x1)*W)); 169 | double fY = max((double)INT_MIN, min((double)INT_MAX, (Y0 + M[3]*x1)*W)); 170 | 171 | double _X = fX/double(INTER_TAB_SIZE); 172 | double _Y = fY/double(INTER_TAB_SIZE); 173 | 174 | if( _X > margin && _X < width-1-margin && _Y > margin && _Y < height-1-margin ) 175 | mask.at(y+y1, x+x1) = 1; 176 | 177 | int X = saturate_cast(fX); 178 | int Y = saturate_cast(fY); 179 | 180 | xy[x1*2] = saturate_cast(X >> INTER_BITS); 181 | xy[x1*2+1] = saturate_cast(Y >> INTER_BITS); 182 | alpha[x1] = (short)((Y & (INTER_TAB_SIZE-1))*INTER_TAB_SIZE + (X & (INTER_TAB_SIZE-1))); 183 | } 184 | } 185 | 186 | Mat _matA(bh, bw, CV_16U, A); 187 | remap( src, dpart, _XY, _matA, interpolation, borderType, borderValue ); 188 | } 189 | } 190 | 191 | for( y = 0; y < height; y++ ) { 192 | const uchar* m = mask.ptr(y); 193 | const uchar* s = prev_src.ptr(y); 194 | uchar* d = dst.ptr(y); 195 | for( x = 0; x < width; x++ ) { 196 | if(m[x] == 0) 197 | d[x] = s[x]; 198 | } 199 | } 200 | } 201 | 202 | void ComputeMatch(const std::vector& prev_kpts, const std::vector& kpts, 203 | const Mat& prev_desc, const Mat& desc, std::vector& prev_pts, std::vector& pts) 204 | { 205 | prev_pts.clear(); 206 | pts.clear(); 207 | 208 | if(prev_kpts.size() == 0 || kpts.size() == 0) 209 | return; 210 | 211 | Mat mask = windowedMatchingMask(kpts, prev_kpts, 25, 25); 212 | 213 | //-- Step 3: Matching descriptor vectors with a brute force matcher 214 | BFMatcher desc_matcher(NORM_L2); 215 | std::vector matches; 216 | desc_matcher.match(desc, prev_desc, matches, mask); 217 | 218 | prev_pts.reserve(matches.size()); 219 | pts.reserve(matches.size()); 220 | 221 | for(size_t i = 0; i < matches.size(); i++) { 222 | const DMatch& dmatch = matches[i]; 223 | // get the point pairs that are successfully matched 224 | prev_pts.push_back(prev_kpts[dmatch.trainIdx].pt); 225 | pts.push_back(kpts[dmatch.queryIdx].pt); 226 | } 227 | 228 | return; 229 | } 230 | 231 | void MergeMatch(const std::vector& prev_pts1, const std::vector& pts1, 232 | const std::vector& prev_pts2, const std::vector& pts2, 233 | std::vector& prev_pts_all, std::vector& pts_all) 234 | { 235 | prev_pts_all.clear(); 236 | prev_pts_all.reserve(prev_pts1.size() + prev_pts2.size()); 237 | 238 | pts_all.clear(); 239 | pts_all.reserve(pts1.size() + pts2.size()); 240 | 241 | for(size_t i = 0; i < prev_pts1.size(); i++) { 242 | prev_pts_all.push_back(prev_pts1[i]); 243 | pts_all.push_back(pts1[i]); 244 | } 245 | 246 | for(size_t i = 0; i < prev_pts2.size(); i++) { 247 | prev_pts_all.push_back(prev_pts2[i]); 248 | pts_all.push_back(pts2[i]); 249 | } 250 | 251 | return; 252 | } 253 | 254 | void MatchFromFlow_copy(const Mat& prev_grey, const Mat& flow_x, const Mat& flow_y, std::vector& prev_pts, std::vector& pts, const Mat& mask) 255 | { 256 | int width = prev_grey.cols; 257 | int height = prev_grey.rows; 258 | prev_pts.clear(); 259 | pts.clear(); 260 | 261 | const int MAX_COUNT = 1000; 262 | goodFeaturesToTrack(prev_grey, prev_pts, MAX_COUNT, 0.001, 3, mask); 263 | 264 | if(prev_pts.size() == 0) 265 | return; 266 | 267 | for(unsigned int i = 0; i < prev_pts.size(); i++) { 268 | int x = std::min(std::max(cvRound(prev_pts[i].x), 0), width-1); 269 | int y = std::min(std::max(cvRound(prev_pts[i].y), 0), height-1); 270 | 271 | const float* f_x = flow_x.ptr(y); 272 | const float* f_y = flow_y.ptr(y); 273 | pts.push_back(Point2f(x+f_x[x], y+f_y[y])); 274 | } 275 | } 276 | 277 | void converFlowMat(Mat& flowIn, Mat& flowOut,float min_range_, float max_range_) 278 | { 279 | float value = 0.0f; 280 | for(int i = 0; i < flowIn.rows; i++) 281 | { 282 | float* Di = flowIn.ptr(i); 283 | char* Ii = flowOut.ptr(i); 284 | for(int j = 0; j < flowIn.cols; j++) 285 | { 286 | value = (Di[j]-min_range_)/(max_range_-min_range_); 287 | 288 | value *= 255; 289 | value = cvRound(value); 290 | 291 | Ii[j] = (char) value; 292 | } 293 | } 294 | } 295 | 296 | static void convertFlowToImage(const Mat &flowIn, Mat &flowOut, 297 | float lowerBound, float higherBound) { 298 | #define CAST(v, L, H) ((v) > (H) ? 255 : (v) < (L) ? 0 : cvRound(255*((v) - (L))/((H)-(L)))) 299 | for (int i = 0; i < flowIn.rows; ++i) { 300 | for (int j = 0; j < flowIn.cols; ++j) { 301 | float x = flowIn.at(i,j); 302 | flowOut.at(i,j) = CAST(x, lowerBound, higherBound); 303 | } 304 | } 305 | #undef CAST 306 | } 307 | 308 | int main( int argc, char *argv[] ) 309 | { 310 | GpuMat frame0GPU, frame1GPU, uGPU, vGPU; 311 | Mat frame0_rgb_, frame1_rgb_, frame0_rgb, frame1_rgb, frame0, frame1, rgb_out; 312 | Mat frame0_32, frame1_32, imgU, imgV; 313 | Mat motion_flow, flow_rgb; 314 | 315 | char cad[N_CHAR]; 316 | struct timeval tod1; 317 | double t1 = 0.0, t2 = 0.0, tdflow = 0.0, t1fr = 0.0, t2fr = 0.0, tdframe = 0.0; 318 | 319 | int start_with_vid = 1; 320 | int gpuID = 0; 321 | int type = 1; 322 | int frameSkip = 1; 323 | 324 | 325 | int vidcount = 0; 326 | 327 | const char* keys = "{ h | help | false | print help message }" 328 | "{ v | start_video | 1 | start video id }" 329 | "{ g | gpuID | 1 | use this gpu}" 330 | "{ f | type | 1 | use this flow method (0=Brox, 1=TV-L1)}" 331 | "{ s | skip | 1 | frame skip}" 332 | "{ vp | vid_path | ./ | path input (where the videos are)}" 333 | "{ op | out_path | ./ | path output}"; 334 | 335 | CommandLineParser cmd(argc, argv, keys); 336 | 337 | if (cmd.get("help")) 338 | { 339 | cout << "Usage: compute_flow [options]" << endl; 340 | cout << "Avaible options:" << endl; 341 | cmd.printParams(); 342 | return 0; 343 | } 344 | 345 | if (argc > 1) { 346 | start_with_vid = cmd.get("start_video"); 347 | gpuID = cmd.get("gpuID"); 348 | type = cmd.get("type"); 349 | frameSkip = cmd.get("skip"); 350 | vid_path = cmd.get("vid_path"); 351 | out_path = cmd.get("out_path"); 352 | out_path_jpeg = out_path + "/rgb/"; 353 | cout << "start_vid:" << start_with_vid << "gpuID:" << gpuID << "flow method: "<< type << " frameSkip: " << frameSkip << " vid_path: " << vid_path << " out_path" << out_path << " jpegs: " << out_path_jpeg << endl; 354 | } 355 | 356 | int totalvideos = 0; 357 | DIR * dirp; 358 | struct dirent * entry; 359 | 360 | dirp = opendir(vid_path.c_str()); /* There should be error handling after this */ 361 | while ((entry = readdir(dirp)) != NULL) { 362 | if (entry->d_type == DT_REG) { /* If the entry is a regular file */ 363 | totalvideos++; 364 | } 365 | } 366 | closedir(dirp); 367 | 368 | //cv::Ptr detector_surf = xfeatures2d::SurfFeatureDetector::create(200); 369 | //cv::Ptr extractor_surf = xfeatures2d::SurfDescriptorExtractor::create(true, true); 370 | SurfFeatureDetector detector_surf(200); 371 | SurfDescriptorExtractor extractor_surf; 372 | 373 | std::vector prev_pts_flow, pts_flow; 374 | std::vector prev_pts_surf, pts_surf; 375 | std::vector prev_pts_all, pts_all; 376 | std::vector prev_kpts_surf, kpts_surf; 377 | Mat prev_desc_surf, desc_surf; 378 | Mat capture_frame, capture_image, prev_image, capture_gray, prev_gray, human_mask; 379 | 380 | cv::gpu::setDevice(gpuID); 381 | 382 | cv::gpu::printShortCudaDeviceInfo(cv::gpu::getDevice()); 383 | 384 | cv::gpu::BroxOpticalFlow dflow(alpha_,gamma_,scale_factor_,inner_iterations_,outer_iterations_,solver_iterations_); 385 | 386 | cv::gpu::OpticalFlowDual_TVL1_GPU alg_tvl1; 387 | 388 | QString vpath = QString::fromStdString(vid_path); 389 | QStringList filters; 390 | 391 | QDirIterator dirIt(vpath, QDirIterator::Subdirectories); 392 | 393 | 394 | int vidID = 0; 395 | std::string video, outfile_u, outfile_v, outfile_jpeg, outfile; 396 | 397 | for (; (dirIt.hasNext()); ) 398 | { 399 | //std::cout << "asdf "<< std::endl; 400 | dirIt.next(); 401 | QString file = dirIt.fileName(); 402 | if ((QFileInfo(dirIt.filePath()).suffix() == "mp4") || (QFileInfo(dirIt.filePath()).suffix() == "avi")) 403 | { 404 | video = dirIt.filePath().toStdString(); 405 | } 406 | 407 | else 408 | continue; 409 | 410 | vidID++; 411 | 412 | if (vidID < start_with_vid) 413 | continue; 414 | 415 | 416 | std::string fName(video); 417 | std::string path(video); 418 | size_t last_slash_idx = std::string::npos; 419 | if (!createOutDirs) 420 | { 421 | // Remove directory if present. 422 | // Do this before extension removal incase directory has a period character. 423 | std::cout << "removing directories: " << fName << std::endl; 424 | last_slash_idx = fName.find_last_of("\\/"); 425 | if (std::string::npos != last_slash_idx) 426 | { 427 | fName.erase(0, last_slash_idx + 1); 428 | path.erase(last_slash_idx + 1, path.length()); 429 | } 430 | } 431 | else 432 | { 433 | last_slash_idx = fName.find(vid_path); 434 | fName.erase(0, vid_path.length()); 435 | path.erase(vid_path.length(), path.length()); 436 | } 437 | 438 | // Remove extension if present. 439 | const size_t period_idx = fName.rfind('.'); 440 | if (std::string::npos != period_idx) 441 | fName.erase(period_idx); 442 | 443 | /*QString out_folder_u = QString::fromStdString(out_path + "x/" + fName); 444 | bool folder_exists = QDir(out_folder_u).exists();*/ 445 | 446 | QString out_folder = QString::fromStdString(out_path + fName); 447 | 448 | bool folder_exists = QDir(out_folder).exists(); 449 | 450 | if (folder_exists) { 451 | std::cout << "already exists: " << out_path << fName << std::endl; 452 | continue; 453 | } 454 | 455 | bool folder_created = QDir().mkpath(out_folder); 456 | if (!folder_created) { 457 | std::cout << "cannot create: " << out_path << fName << std::endl; 458 | continue; 459 | } 460 | 461 | /*QString out_folder_v = QString::fromStdString(out_path + "y/" + fName); 462 | QDir().mkpath(out_folder_v);*/ 463 | if(rgb){ 464 | QString out_folder_jpeg = QString::fromStdString(out_path_jpeg + fName); 465 | QDir().mkpath(out_folder_jpeg); 466 | outfile_jpeg = out_folder_jpeg.toStdString(); 467 | } 468 | 469 | // Create a separate folder for the .bins 470 | FILE *fx = NULL; 471 | if (bins == true){ 472 | QString out_folder_bins = QString::fromStdString(out_path + "bins/" + fName); 473 | QDir().mkpath(out_folder_bins); 474 | std::string outfile = out_path + "bins/" + fName + ".bin"; 475 | // Uncomment this if you want bins 476 | //FILE *fx = fopen(outfile.c_str(),"wb"); 477 | } 478 | 479 | 480 | //if(debug){ 481 | std::cout << video << " " << vidcount << "/" << totalvideos << std::endl; 482 | //} 483 | vidcount++; 484 | 485 | VideoCapture cap; 486 | try 487 | { 488 | cap.open(video); 489 | } 490 | catch (std::exception& e) 491 | { 492 | std::cout << e.what() << '\n'; 493 | } 494 | int width_out = 224, height_out = 224; 495 | int nframes = 0, width = 0, height = 0; 496 | float factor = 0, factor_out = 0; 497 | 498 | if( cap.isOpened() == 0 ) 499 | { 500 | return -1; 501 | } 502 | 503 | cap >> frame1_rgb_; 504 | 505 | if( resize_img == true ) 506 | { 507 | factor = std::max(MIN_SZ/frame1_rgb_.cols, MIN_SZ/frame1_rgb_.rows); 508 | 509 | width = std::floor(frame1_rgb_.cols*factor); 510 | width -= width%2; 511 | height = std::floor(frame1_rgb_.rows*factor); 512 | height -= height%2; 513 | 514 | frame1_rgb = cv::Mat(Size(width,height),CV_8UC3); 515 | width = frame1_rgb.cols; 516 | height = frame1_rgb.rows; 517 | cv::resize(frame1_rgb_,frame1_rgb,cv::Size(width_out,height_out),0,0,INTER_CUBIC); 518 | 519 | factor_out = std::max(OUT_SZ/width, OUT_SZ/height); 520 | 521 | rgb_out = cv::Mat(Size(cvRound(width*factor_out),cvRound(height*factor_out)),CV_8UC3); 522 | //width_out = rgb_out.cols; 523 | //height_out = rgb_out.rows; 524 | } 525 | else 526 | { 527 | frame1_rgb = cv::Mat(Size(frame1_rgb_.cols,frame1_rgb_.rows),CV_8UC3); 528 | width = frame1_rgb.cols; 529 | height = frame1_rgb.rows; 530 | frame1_rgb_.copyTo(frame1_rgb); 531 | } 532 | 533 | // Allocate memory for the images 534 | frame0_rgb = cv::Mat(Size(width,height),CV_8UC3); 535 | flow_rgb = cv::Mat(Size(width,height),CV_8UC3); 536 | motion_flow = cv::Mat(Size(width,height),CV_8UC3); 537 | frame0 = cv::Mat(Size(width,height),CV_8UC1); 538 | frame1 = cv::Mat(Size(width,height),CV_8UC1); 539 | frame0_32 = cv::Mat(Size(width,height),CV_32FC1); 540 | frame1_32 = cv::Mat(Size(width,height),CV_32FC1); 541 | 542 | // Convert the image to grey and float 543 | cvtColor(frame1_rgb,frame1,CV_BGR2GRAY); 544 | frame1.convertTo(frame1_32,CV_32FC1,1.0/255.0,0); 545 | 546 | outfile = out_folder.toStdString(); 547 | //outfile_u = out_folder_u.toStdString(); 548 | //outfile_v = out_folder_v.toStdString(); 549 | 550 | 551 | while( frame1.empty() == false ) 552 | { 553 | gettimeofday(&tod1,NULL); 554 | t1fr = tod1.tv_sec + tod1.tv_usec / 1000000.0; 555 | if( nframes >= 1 ) 556 | { 557 | gettimeofday(&tod1,NULL); 558 | // GetSystemTime(&tod1); 559 | t1 = tod1.tv_sec + tod1.tv_usec / 1000000.0; 560 | switch(type){ 561 | case 0: 562 | frame1GPU.upload(frame1_32); 563 | frame0GPU.upload(frame0_32); 564 | dflow(frame0GPU,frame1GPU,uGPU,vGPU); 565 | case 1: 566 | frame1GPU.upload(frame1); 567 | frame0GPU.upload(frame0); 568 | alg_tvl1(frame0GPU,frame1GPU,uGPU,vGPU); 569 | } 570 | if (warp == true){ 571 | //get back flow map 572 | Mat flow_x(uGPU); 573 | Mat flow_y(vGPU); 574 | 575 | // warp to reduce holistic motion (i'm not sure if frame1 is grayscale) 576 | //std::cout << "Detector:" << std::endl; 577 | detector_surf.detect(frame1, kpts_surf, human_mask); 578 | //std::cout << "Extractor:" << std::endl; 579 | extractor_surf.compute(frame1, kpts_surf, desc_surf); 580 | //std::cout << "Computing match:" << std::endl; 581 | ComputeMatch(prev_kpts_surf, kpts_surf, prev_desc_surf, desc_surf, prev_pts_surf, pts_surf); 582 | //std::cout << "Matching flows:" << std::endl; 583 | MatchFromFlow_copy(frame1, flow_x, flow_y, prev_pts_flow, pts_flow, human_mask); 584 | //std::cout << "Fixing match:" << std::endl; 585 | MergeMatch(prev_pts_flow, pts_flow, prev_pts_surf, pts_surf, prev_pts_all, pts_all); 586 | 587 | Mat H = Mat::eye(3, 3, CV_64FC1); 588 | if(pts_all.size() > 50) { 589 | std::vector match_mask; 590 | Mat temp = findHomography(prev_pts_all, pts_all, RANSAC, 1, match_mask); 591 | if(cv::countNonZero(Mat(match_mask)) > 25) 592 | H = temp; 593 | } 594 | 595 | Mat H_inv = H.inv(); 596 | Mat gray_warp = Mat::zeros(frame1.size(), CV_8UC1); 597 | MyWarpPerspective(frame0, frame1, gray_warp, H_inv); // Most important function 598 | 599 | // re-extract flow on warped images 600 | //std::cout << "Recomputing flow on warped images:" << std::endl; 601 | frame1GPU.upload(gray_warp); 602 | frame0GPU.upload(frame0); 603 | alg_tvl1(frame0GPU,frame1GPU,uGPU,vGPU); 604 | } 605 | uGPU.download(imgU); 606 | vGPU.download(imgV); 607 | 608 | gettimeofday(&tod1,NULL); 609 | t2 = tod1.tv_sec + tod1.tv_usec / 1000000.0; 610 | tdflow = 1000.0*(t2-t1); 611 | 612 | }else{ 613 | if (warp == true){ 614 | //video_stream >> capture_frame; 615 | //if (capture_frame.empty()) return; // read frames until end 616 | initializeMats(frame1, capture_image, capture_gray, prev_image, prev_gray); 617 | capture_frame.copyTo(frame0); 618 | cvtColor(prev_image, prev_gray, CV_BGR2GRAY); 619 | 620 | //detect key points 621 | human_mask = Mat::ones(capture_frame.size(), CV_8UC1); 622 | detector_surf.detect(prev_gray, prev_kpts_surf, human_mask); 623 | extractor_surf.compute(prev_gray, prev_kpts_surf, prev_desc_surf); 624 | // TODO! check detector_surf->detectAndCompute() 625 | } 626 | } 627 | 628 | if( WRITEOUT_IMGS == true && nframes >= 1 ) 629 | { 630 | if( resize_img == true ) 631 | { 632 | 633 | cv::resize(imgU,imgU,cv::Size(width_out,height_out),0,0,INTER_CUBIC); 634 | cv::resize(imgV,imgV,cv::Size(width_out,height_out),0,0,INTER_CUBIC); 635 | 636 | } 637 | 638 | 639 | double min_u, max_u; 640 | cv::minMaxLoc(imgU, &min_u, &max_u); 641 | double min_v, max_v; 642 | cv::minMaxLoc(imgV, &min_v, &max_v); 643 | 644 | 645 | float min_u_f = min_u; 646 | float max_u_f = max_u; 647 | 648 | float min_v_f = min_v; 649 | float max_v_f = max_v; 650 | 651 | if (clipFlow) { 652 | min_u_f = -20; 653 | max_u_f = 20; 654 | 655 | min_v_f = -20; 656 | max_v_f = 20; 657 | } 658 | 659 | cv::Mat img_u(imgU.rows, imgU.cols, CV_8UC1); 660 | cv::Mat img_v(imgV.rows, imgV.cols, CV_8UC1); 661 | cv::Mat img_norm_uv(imgV.rows, imgV.cols, CV_8UC1); 662 | 663 | GpuMat u_sq, v_sq, uv_sq, norm_uv; 664 | Mat normUV; 665 | cv::gpu::sqr(uGPU, u_sq); 666 | cv::gpu::sqr(vGPU, v_sq); 667 | cv::gpu::add(u_sq, v_sq, uv_sq); 668 | cv::gpu::sqrt(uv_sq, norm_uv); 669 | norm_uv.download(normUV); 670 | convertFlowToImage(normUV, img_norm_uv, min_u_f, max_u_f);\ 671 | convertFlowToImage(imgU, img_u, min_u_f, max_u_f); 672 | convertFlowToImage(imgV, img_v, min_v_f, max_v_f); 673 | 674 | std::vector images(3); 675 | Mat black = Mat::zeros(imgU.rows, imgU.cols, CV_8UC1); 676 | images.at(0) = img_u; //for blue channel 677 | images.at(1) = img_v; //for green channel 678 | images.at(2) = img_norm_uv; //for red channel 679 | 680 | cv::Mat colorImage; 681 | cv::merge(images, colorImage); 682 | sprintf(cad,"/frame%06d.jpg",nframes); 683 | 684 | //imwrite(outfile_u+cad,img_u); 685 | //imwrite(outfile_v+cad,img_v); 686 | imwrite(outfile+cad,colorImage); 687 | if (bins == true){ 688 | fwrite(&min_u_f,sizeof(float),1,fx); 689 | fwrite(&max_u_f,sizeof(float),1,fx); 690 | fwrite(&min_v_f,sizeof(float),1,fx); 691 | fwrite(&max_v_f,sizeof(float),1,fx); 692 | } 693 | } 694 | 695 | sprintf(cad,"/frame%06d.jpg",nframes + 1); 696 | if(rgb){ 697 | if( resize_img == true ) 698 | { 699 | cv::resize(frame1_rgb,rgb_out,cv::Size(width_out,height_out),0,0,INTER_CUBIC); 700 | imwrite(outfile_jpeg+cad,rgb_out); 701 | } 702 | else 703 | imwrite(outfile_jpeg+cad,frame1_rgb); 704 | } 705 | if(debug){ 706 | std::cout << "writing:" << outfile_jpeg+cad << std::endl; 707 | } 708 | frame1_rgb.copyTo(frame0_rgb); 709 | cvtColor(frame0_rgb,frame0,CV_BGR2GRAY); 710 | frame0.convertTo(frame0_32,CV_32FC1,1.0/255.0,0); 711 | 712 | nframes++; 713 | for (int iskip = 0; iskip> frame1_rgb_; 716 | } 717 | if( frame1_rgb_.empty() == false ) 718 | { 719 | if( resize_img == true ) 720 | { 721 | cv::resize(frame1_rgb_,frame1_rgb,cv::Size(width_out,height_out),0,0,INTER_CUBIC); 722 | } 723 | else 724 | { 725 | frame1_rgb_.copyTo(frame1_rgb); 726 | } 727 | 728 | cvtColor(frame1_rgb,frame1,CV_BGR2GRAY); 729 | frame1.convertTo(frame1_32,CV_32FC1,1.0/255.0,0); 730 | } 731 | else 732 | { 733 | break; 734 | } 735 | 736 | gettimeofday(&tod1,NULL); 737 | if(debug){ 738 | t2fr = tod1.tv_sec + tod1.tv_usec / 1000000.0; 739 | tdframe = 1000.0*(t2fr-t1fr); 740 | cout << "Processing video" << fName << "ID="<< vidID << " Frame Number: " << nframes << endl; 741 | cout << "Time type=" << type << " Flow: " << tdflow << " ms" << endl; 742 | cout << "Time All: " << tdframe << " ms" << endl; 743 | } 744 | 745 | } 746 | if (bins == true){ 747 | fclose(fx); 748 | } 749 | } 750 | 751 | return 0; 752 | } 753 | --------------------------------------------------------------------------------