PlaneSweepLib icon indicating copy to clipboard operation
PlaneSweepLib copied to clipboard

Compile issue

Open muskie82 opened this issue 3 years ago • 2 comments

Hello.

I failed to build the source code. The error message is,

/home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cpp: In member function ‘std::pair<PSL_CUDA::DeviceImage, PSL::FishEyeCameraMatrix<double> > PSL_CUDA::CudaFishEyeImageProcessor::undistort(double, double, double, double, double, double)’:
/home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cpp:78:92: error: no matching function for call to ‘make_pair<PSL_CUDA::DeviceImage, PSL::FishEyeCameraMatrix<double> >(PSL_CUDA::DeviceImage&, PSL::FishEyeCameraMatrix<double>&)’
     return std::make_pair<DeviceImage, FishEyeCameraMatrix<double> >(outputImage, newCamera);
                                                                                            ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaCommon.h:21,
                 from /home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/deviceImage.h:21,
                 from /home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.h:21,
                 from /home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cpp:18:
/usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
/home/hide/hide_ws/mvs/PlaneSweepLib/src/PSL/psl_cudaBase/cudaFishEyeImageProcessor.cpp:78:92: note:   cannot convert ‘outputImage’ (type ‘PSL_CUDA::DeviceImage’) to type ‘PSL_CUDA::DeviceImage&&’
     return std::make_pair<DeviceImage, FishEyeCameraMatrix<double> >(outputImage, newCamera);
                                                                                            ^
src/PSL/CMakeFiles/PSL.dir/build.make:1545: recipe for target 'src/PSL/CMakeFiles/PSL.dir/psl_cudaBase/cudaFishEyeImageProcessor.cpp.o' failed
make[2]: *** [src/PSL/CMakeFiles/PSL.dir/psl_cudaBase/cudaFishEyeImageProcessor.cpp.o] Error 1
CMakeFiles/Makefile2:174: recipe for target 'src/PSL/CMakeFiles/PSL.dir/all' failed

Has anyone met this error before? I use Ubuntu 18.04 and CUDA 11.1 .

Sincerely,

muskie82 avatar Jun 07 '21 17:06 muskie82

You can try to replace "std::make_pair<DeviceImage, FishEyeCameraMatrix >(outputImage, newCamera)" with {outputImage, newCamera}

minxuanjun avatar Jul 08 '21 08:07 minxuanjun

@minxuanjun Thanks, it works.

muskie82 avatar Jul 14 '21 10:07 muskie82