Practice3DVision / SLMaster

SLMaster is a relatively complete open-source Structured Light 3D camera software. You can use it to complete a series of operations including calibration, stripe encoding, 3D reconstruction, and point cloud post-processing. Welcome Star⭐ And Fork🍴.
https://github.com/Practice3DVision/SLMaster/wiki
GNU Affero General Public License v3.0
195 stars 40 forks source link

编译cuda_structuredlight模块报错 #5

Closed yansudong closed 6 months ago

yansudong commented 6 months ago

编译环境为VS2022和CUDA v12.1 cudnn v8.8.1,是否存在不兼容的问题呢?


严重性 代码 说明 项目 文件 行 禁止显示状态 详细信息 错误 more than one instance of overloaded function "__hadd" matches the argument list: opencv_cudastructuredlight D:\envs\eigen-3.3.8\Eigen\src\Core\arch\CUDA\Half.h 213
错误 LNK1181 无法打开输入文件“....\lib\Release\opencv_core480.lib” opencv_cudaarithm E:\sdyan\opencv\build-opencv\modules\cudaarithm\LINK 1
错误 LNK1181 无法打开输入文件“....\lib\Release\opencv_core480.lib” opencv_imgproc E:\sdyan\opencv\build-opencv\modules\imgproc\LINK 1
错误 LNK1181 无法打开输入文件“....\lib\Release\opencv_imgproc480.lib” opencv_phase_unwrapping E:\sdyan\opencv\build-opencv\modules\phase_unwrapping\LINK 1
错误 LNK1181 无法打开输入文件“....\lib\Release\opencv_imgproc480.lib” opencv_features2d E:\sdyan\opencv\build-opencv\modules\features2d\LINK 1
错误 LNK1181 无法打开输入文件“....\lib\Release\opencv_features2d480.lib” opencv_calib3d E:\sdyan\opencv\build-opencv\modules\calib3d\LINK 1
错误 C2530 “cv::structured_light::leftUnwrapMap”: 必须初始化引用 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 340
错误 C2530 “cv::structured_light::InputArray”: 必须初始化引用 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 340
错误 C2146 语法错误: 缺少“;”(在标识符“rightUnwrapMap”的前面) opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 340
错误 C4430 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 340
错误 C4430 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 341
错误 C2146 语法错误: 缺少“;”(在标识符“disparityMap”的前面) opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 341
错误 C2059 语法错误:“)” opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 341
错误 C2143 语法错误: 缺少“;”(在“{”的前面) opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 341
错误 C2447 “{”: 缺少函数标题(是否是老式的形式表?) opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 341
错误 C2061 语法错误: 标识符“OutputArray” opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 407
错误 C2511 “bool cv::structured_light::SinusCompleGrayCodePattern_Impl::decode(const std::vector<std::vector<cv::Mat,std::allocator>,std::allocator<std::vector<cv::Mat,std::allocator>>> &) const”:“cv::structured_light::SinusCompleGrayCodePattern_Impl”中没有找到重载的成员函数 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 405
错误 C2065 “blackImages”: 未声明的标识符 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 409
错误 C2065 “whiteImages”: 未声明的标识符 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 410
错误 C2065 “disparityMap”: 未声明的标识符 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 414
错误 C2530 “disparity”: 必须初始化引用 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 414
错误 C2065 “flags”: 未声明的标识符 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 416
错误 C2671 “cv::structured_light::SinusCompleGrayCodePattern_Impl::decode”: 静态成员函数没有“this”指针 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 438
错误 C2440 “”: 无法从“initializer list”转换为“cv::structured_light::SinusCompleGrayCodePattern_Impl::decode::” opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 438
错误 C2661 “cv::parallelfor”: 没有重载函数接受 1 个参数 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 422
错误 C2352 “cv::structured_light::SinusCompleGrayCodePattern_Impl::computeDisparity”: 调用非静态成员函数需要一个对象 opencv_structured_light E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\structured_light\src\sinus_comple_graycode_pattern.cpp 441
错误 MSB8066 “E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\calc_wrapped_and_confidence_map.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\from_depth_get_texture.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\generate_cloud.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\multi_view_stereo_geometry.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\polynomial_fitting.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\reverse_camera.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\stereo_match.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\unwrap_sinus_comple_graycode.cu;E:\sdyan\opencv\opencv_contrib-liuyunhuang\modules\cudastructuredlight\src\cuda\unwrap_with_ref_unwrapped_map.cu”的自定义生成已退出,代码为 1。 opencv_cudastructuredlight C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 254

Practice3DVision commented 6 months ago

该问题与之相同,请查看评论以获得解决方法: #2

yansudong commented 6 months ago

解决了,谢谢!