VLOGroup / imageutilities

GNU Lesser General Public License v3.0
17 stars 9 forks source link

Problem to build with IO module #5

Closed raymond00000 closed 7 years ago

raymond00000 commented 7 years ago

I have installed openCV. but still, I cannot build the code with IO, GUI module.. Any advice is highly appreciated.

[-] ImageUtilities omitting IO module [-] ImageUtilities omitting GUI module

lscm@lscm-Dell-XPS420:/usr/local/lib$ ls libcaer.so libopencv_legacy.a libcaer.so.2 libopencv_legacy.so libcaer.so.2.0.0 libopencv_legacy.so.2.4 libcnpy.a libopencv_legacy.so.2.4.13 libcnpy.so libopencv_ml.a libiucore.so libopencv_ml.so libiucore.so.2.10 libopencv_ml.so.2.4 libiucore.so.2.1.0 libopencv_ml.so.2.4.13 libiumath.so libopencv_nonfree.a libiumath.so.2.10 libopencv_nonfree.so libiumath.so.2.1.0 libopencv_nonfree.so.2.4 libndarray.so libopencv_nonfree.so.2.4.13 libopencv_calib3d.a libopencv_objdetect.a libopencv_calib3d.so libopencv_objdetect.so libopencv_calib3d.so.2.4 libopencv_objdetect.so.2.4 libopencv_calib3d.so.2.4.13 libopencv_objdetect.so.2.4.13 libopencv_contrib.a libopencv_ocl.a libopencv_contrib.so libopencv_ocl.so libopencv_contrib.so.2.4 libopencv_ocl.so.2.4 libopencv_contrib.so.2.4.13 libopencv_ocl.so.2.4.13 libopencv_core.a libopencv_photo.a libopencv_core.so libopencv_photo.so libopencv_core.so.2.4 libopencv_photo.so.2.4 libopencv_core.so.2.4.13 libopencv_photo.so.2.4.13 libopencv_features2d.a libopencv_stitching.a libopencv_features2d.so libopencv_stitching.so libopencv_features2d.so.2.4 libopencv_stitching.so.2.4 libopencv_features2d.so.2.4.13 libopencv_stitching.so.2.4.13 libopencv_flann.a libopencv_superres.a libopencv_flann.so libopencv_superres.so libopencv_flann.so.2.4 libopencv_superres.so.2.4 libopencv_flann.so.2.4.13 libopencv_superres.so.2.4.13 libopencv_gpu.a libopencv_ts.a libopencv_gpu.so libopencv_video.a libopencv_gpu.so.2.4 libopencv_video.so libopencv_gpu.so.2.4.13 libopencv_video.so.2.4 libopencv_highgui.a libopencv_video.so.2.4.13 libopencv_highgui.so libopencv_videostab.a libopencv_highgui.so.2.4 libopencv_videostab.so libopencv_highgui.so.2.4.13 libopencv_videostab.so.2.4 libopencv_imgproc.a libopencv_videostab.so.2.4.13 libopencv_imgproc.so pkgconfig libopencv_imgproc.so.2.4 python2.7 libopencv_imgproc.so.2.4.13 python3.5

lscm@lscm-Dell-XPS420:~/dvs/dvs-reconstruction/imageutilities/build$ cmake .. [-] ImageUtilities omitting IO module [-] ImageUtilities omitting GUI module [+] ImageUtilities include Math module [-] do not build static library Compiler Flags NVCC: -arch=sm_30-std=c++11 -- libs =ndarray -- libs =ndarray -- libs =ndarray NDARRAY_LIB=ndarray additional iuio libs: install: /usr/local -- Configuring done -- Generating done -- Build files have been written to: /home/lscm/dvs/dvs-reconstruction/imageutilities/build

reini1305 commented 7 years ago

It seems like CMake does not find Open CV on your machine. I have no general recipe about how to solve this. Please try some simple project which just includes OpenCV or maybe you can find a similar problem/solution on StackExchange.

raymond00000 commented 7 years ago

seems like i cannot change IU_USE_GUI ON as "generate" set it back to off.. "This means that either QT5 or OpenCV have not been found."

Can you update the depedency of below modules: iugui iuio

thanks.

reini1305 commented 7 years ago

Both wouldn't compile without the proper dependencies. I'm not sure what you mean?

raymond00000 commented 7 years ago

sorry, i mean can you tell me the dependencies of each module:

iugui -> need QT5 or OpenCV iuio -> need?

thanks

reini1305 commented 7 years ago

gui needs qt5 and opencv, iu needs opencv as far as I remember.

raymond00000 commented 7 years ago

so, will it be so far my problem is I have not installed qt5?? then it is really critical, very appreciated if you can confirm the dependency, many thanks.

reini1305 commented 7 years ago

if you use Ubuntu 16.04, install libqt5opengl-dev this should come with the right dependencies.

raymond00000 commented 7 years ago

thanks for useful hint, let me try and update you tmr. thanks!!

raymond00000 commented 7 years ago

lscm@san-ThinkPad-P50:~/dvs-reconstruction/imageutilities/build$ cmake .. -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-8.0 (found suitable version "8.0", minimum required is "5.0") [+] ImageUtilities include IO module Enabling fixes for OpenCV >= 3 [-] build io module without Flycapture2/Pointgrey support [+] build io module with OpenEXR support include dirs: /usr/include/usr/include/OpenEXR [+] ImageUtilities include GUI module [+] ImageUtilities include Math module [-] do not build static library Compiler Flags NVCC: -arch=sm_30-std=c++11 -- libs =ndarray -- libs =ndarray -- libs =ndarray NDARRAY_LIB=ndarray additional iuio libs: /usr/lib/x86_64-linux-gnu/libHalf.so;/usr/lib/x86_64-linux-gnu/libIex.so;/usr/lib/x86_64-linux-gnu/libIlmImf.so;/usr/lib/x86_64-linux-gnu/libIlmThread.so;/usr/lib/x86_64-linux-gnu/libImath.so install: /home/lscm/dvs-reconstruction/imageutilities -- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libHalf.so;/usr/lib/x86_64-linux-gnu/libIex.so;/usr/lib/x86_64-linux-gnu/libIlmImf.so;/usr/lib/x86_64-linux-gnu/libIlmThread.so;/usr/lib/x86_64-linux-gnu/libImath.so
-- Configuring done -- Generating done -- Build files have been written to: /home/lscm/dvs-reconstruction/imageutilities/build

raymond00000 commented 7 years ago

i can build it now, thanks.

TrackingBird commented 6 years ago

Dear sir, Sorry to brother you. I got some similar errors in compiling our stereo model. Meanwhile i have install Q5.6, opencv3.1 in my ubuntu16.04 PC. can you give me some suggestions about how to solve this problem. Thanks very much.

The logs are as follows: jennifer@jennifer-pc:~/cnn-crf-stereo-master/stereo/build$ sudo cmake ../../stereo -- The C compiler identification is GNU 5.4.1 -- The CXX compiler identification is GNU 5.4.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "5.0") COMPILER FLAGS: -- CMAKE_BUILD_TYPE: Release -- BUILD_SHARED_LIBS: ON -- CMAKE_C_FLAGS= -fopenmp -- CMAKE_CXX_FLAGS = -fopenmp -std=c++11 -fPIC -fmax-errors=3 -fpermissive -ggdb -Wunused-result -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable -Wdisabled-optimization -Wdiv-by-zero -Wc++11-compat -Wno-float-equal -O2 -DPARALLEL -ffast-math -DNDEBUG -- CMAKE_CXX_FLAGS_RELEASE = -O3 -DNDEBUG -- CUDA_NVCC_FLAGS= -arch=sm_30;-expt-extended-lambda;-ftemplate-backtrace-limit=2;-lineinfo;-std=c++11;-Xcompiler=-Wno-sign-compare;-O2;-keep;-src-in-ptx;-DNDEBUG;-Xptxas=-warn-lmem-usage;-Xptxas=-warn-spills -- CUDA_PROPAGATE_HOST_FLAGS= OFF -- COMPILE_DEFINITIONS = /usr/local/cuda-8.0/samples/ /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities -- Imageutilities requested components: iucore;iuio;iumath CMake Error at /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/ImageUtilitiesConfig.cmake:102 (message): iuio marked as required but not found Call Stack (most recent call first): CMakeLists.txt:39 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/jennifer/cnn-crf-stereo-master/stereo/build/CMakeFiles/CMakeOutput.log". See also "/home/jennifer/cnn-crf-stereo-master/stereo/build/CMakeFiles/CMakeError.log".

pknoebelreiter commented 6 years ago

Hi, it seems like the iuio module is not compiled. When you configure the imageutilites make sure the IO module is enabled and CMake can find OpenCV. For example if I type cmake .. in my build directory my output contains

...
[+] ImageUtilities include IO module
Found OpenCV Version: 3.3
...

Delete the CMake cache, i.e., delete the build directory and configure the imageutilities again to see all the output of CMake and check for the '+' in front of the IO module.

TrackingBird commented 6 years ago

Dear sir, when cmake ..,I have got the IO module as follows:

[+] ImageUtilities include IO module
Found OpenCV Version: 3.1
Enabling fixes for OpenCV >= 3
  [-] build io module without Flycapture2/Pointgrey support
  [+] build io module with OpenEXR support
include dirs: /usr/include/usr/include/OpenEXR
[+] ImageUtilities include GUI module
[+] ImageUtilities include Math module
[+] ImageUtilities include ndarray module
[-] do not build static library
additional iuio libs: /usr/lib/x86_64-linux-gnu/libHalf.so;/usr/lib/x86_64-linux-gnu/libIex.so;/usr/lib/x86_64-linux-gnu/libIlmImf.so;/usr/lib/x86_64-linux-gnu/libIlmThread.so;/usr/lib/x86_64-linux-gnu/libImath.so
install: /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/build

while when make, I got the error as follows:

[ 40%] Linking CXX executable test_transform Error copying file "/home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/build/src/ndarray/test_transform" to "../../../bin/tests". src/ndarray/CMakeFiles/test_transform.dir/build.make:115: recipe for target 'src/ndarray/test_transform' failed make[2]: [src/ndarray/test_transform] Error 1 make[2]: Deleting file 'src/ndarray/test_transform' CMakeFiles/Makefile2:432: recipe for target 'src/ndarray/CMakeFiles/test_transform.dir/all' failed make[1]: [src/ndarray/CMakeFiles/test_transform.dir/all] Error 2 make[1]: 正在等待未完成的任务.... [ 42%] Building NVCC (Device) object src/CMakeFiles/iucore.dir/iucore/iucore_generated_copy.cu.o /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/image_gpu.h: In instantiation of ‘size_t iu::ImageGpu<PixelType, Allocator>::stride() const [with PixelType = float3; Allocator = iuprivate::ImageAllocatorGpu; size_t = long unsigned int]’: /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/convert.cu:454:101: required from here /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/image_gpu.h:143:238: warning: ‘static int iu::usePixelType<PixelType, false>::stride(int) [with PixelType = float3]’ is deprecated: this function may return wrong result in case pitch is not divisible by sizeof(PixelType) (typically the case when using _C3 images) [-Wdeprecated-declarations] /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/imagegpu.h:25:178: note: declared here static int attribute((deprecated("this function may return wrong result in case pitch is not divisible by sizeof(PixelType) (typically the case when using C3 images)"))) stride(int pitch){ ^ /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/image_gpu.h:143:238: warning: ‘static int iu::usePixelType<PixelType, false>::stride(int) [with PixelType = float3]’ is deprecated: this function may return wrong result in case pitch is not divisible by sizeof(PixelType) (typically the case when using _C3 images) [-Wdeprecated-declarations] /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/imagegpu.h:25:178: note: declared here static int attribute((deprecated("this function may return wrong result in case pitch is not divisible by sizeof(PixelType) (typically the case when using C3 images)"))) stride(int pitch){ ^ [ 43%] Building NVCC (Device) object src/CMakeFiles/iucore.dir/iucore/iucore_generated_filter.cu.o [ 45%] Building NVCC (Device) object src/CMakeFiles/iucore.dir/iucore/iucore_generated_filterbspline_kernels.cu.o [ 46%] Building NVCC (Device) object src/CMakeFiles/iucore.dir/iucore/iucore_generated_reduce.cu.o [ 47%] Building NVCC (Device) object src/CMakeFiles/iucore.dir/iucore/iucore_generated_prolongate.cu.o Scanning dependencies of target iucore [ 50%] Building CXX object src/CMakeFiles/iucore.dir/iucore/convert.cpp.o [ 50%] Building CXX object src/CMakeFiles/iucore.dir/iucore.cpp.o [ 52%] Building CXX object src/CMakeFiles/iucore.dir/iucore/copy.cpp.o [ 53%] Building CXX object src/CMakeFiles/iucore.dir/iucore/filter.cpp.o [ 54%] Building CXX object src/CMakeFiles/iucore.dir/iucore/reduce.cpp.o /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp: In function ‘void iuprivate::reduce(const ImageGpu_32f_C1, iu::ImageGpu_32f_C1, IuInterpolationType, bool)’: /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp:35:8: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr filtered_auto; ^ In file included from /usr/include/c++/5/memory:81:0, from /usr/local/cuda-8.0/include/thrust/detail/internal_functional.h:29, from /usr/local/cuda-8.0/include/thrust/system/detail/generic/copy.inl:22, from /usr/local/cuda-8.0/include/thrust/system/detail/generic/copy.h:58, from /usr/local/cuda-8.0/include/thrust/detail/copy.inl:21, from /usr/local/cuda-8.0/include/thrust/detail/copy.h:90, from /usr/local/cuda-8.0/include/thrust/system/cuda/detail/assign_value.h:22, from /usr/local/cuda-8.0/include/thrust/system/cuda/detail/get_value.h:21, from /usr/local/cuda-8.0/include/thrust/system/detail/adl/get_value.h:32, from /usr/local/cuda-8.0/include/thrust/detail/reference.inl:23, from /usr/local/cuda-8.0/include/thrust/detail/reference.h:173, from /usr/local/cuda-8.0/include/thrust/memory.h:25, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/linearhostmemory.h:7, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/memorydefs.h:7, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/copy.h:13, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp:2: /usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^ /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp: In function ‘void iuprivate::reduce(const ImageGpu_32f_C4, iu::ImageGpu_32f_C4, IuInterpolationType, bool)’: /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp:139:8: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr filtered_auto; ^ In file included from /usr/include/c++/5/memory:81:0, from /usr/local/cuda-8.0/include/thrust/detail/internal_functional.h:29, from /usr/local/cuda-8.0/include/thrust/system/detail/generic/copy.inl:22, from /usr/local/cuda-8.0/include/thrust/system/detail/generic/copy.h:58, from /usr/local/cuda-8.0/include/thrust/detail/copy.inl:21, from /usr/local/cuda-8.0/include/thrust/detail/copy.h:90, from /usr/local/cuda-8.0/include/thrust/system/cuda/detail/assign_value.h:22, from /usr/local/cuda-8.0/include/thrust/system/cuda/detail/get_value.h:21, from /usr/local/cuda-8.0/include/thrust/system/detail/adl/get_value.h:32, from /usr/local/cuda-8.0/include/thrust/detail/reference.inl:23, from /usr/local/cuda-8.0/include/thrust/detail/reference.h:173, from /usr/local/cuda-8.0/include/thrust/memory.h:25, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/linearhostmemory.h:7, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/memorydefs.h:7, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/copy.h:13, from /home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities/src/iucore/reduce.cpp:2: /usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^ [ 56%] Building CXX object src/CMakeFiles/iucore.dir/iucore/prolongate.cpp.o [ 57%] Building CXX object src/CMakeFiles/iucore.dir/iucore/remap.cpp.o [ 59%] Building CXX object src/CMakeFiles/iucore.dir/iucore_automoc.cpp.o [ 60%] Linking CXX shared library libiucore.so [ 60%] Built target iucore Scanning dependencies of target iumath [ 61%] Building CXX object src/CMakeFiles/iumath.dir/iumath_automoc.cpp.o [ 63%] Linking CXX shared library libiumath.so [ 63%] Built target iumath Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 jennifer@jennifer-pc:~/cnn-crf-stereo-master/dependencies/imageutilities/build$

Can you give me some suggestions about solving the errors. Meanwhile, in imageutilities/src/CMakeLists.txt, in line 98: if(IU_USE_IO AND OpenCV_LIBS).Can you show me OpenCV_LIBS. Does it set in ~/.bashrc like export OpenCV_LIBS ="/usr/local/opencv-310/lib" Or in imageutilities/src/CMakeLists.txt like: set (OpenCV_LIBS "/usr/local/opencv-310/lib")

Hope your reply, thanks very much. Thanks very much, hope for your help.

pknoebelreiter commented 6 years ago

The variable ${OpenCV_LIBS} contains: opencv_core opencv_highguio pencv_videostab. This is exactly what is specified a few lines in above in the CMakeLists file

find_package( OpenCV QUIET COMPONENTS opencv_core opencv_highgui opencv_videostab)

I do not have an OpenCV_LIBS entry in my .bashrc.

Your error says: Error copying file [...] Are you allowed to write to this folder?

Probably, delete the whole build directory and configure and make the project again.

Best regards