Ask Your Question

Armin Samii's profile - activity

2013-01-12 07:57:09 -0600 asked a question Compiling OpenCV with CUDA: issues in color.cu

I am having issues compiling the latest OpenCV with Cuda. I get errors saying that a function body matches multiple headers. For example:

error: more than one instance of overloaded function "cv::gpu::device::color_detail::XYZ2RGBConvert" matches the argument list: function template "void cv::gpu::device::color_detail::XYZ2RGBConvert<bidx,t,d>(const T &, D *)" function template "void cv::gpu::device::color_detail::XYZ2RGBConvert<bidx,t>(const T &, float *)"

One is templated and the other isn't.

I can fix this in ../modules/gpu/src/cuda/color.cu by changing all offending lines to not implement the float, but then I later get linker errors such as:

../../lib/libopencv_gpu.so.2.4.3: undefined reference to `cv::gpu::device::yuv4_to_rgba_32f(cv::gpu::PtrStepSz<unsigned char=""> const&, cv::gpu::PtrStepSz<unsigned char=""> const&, CUstream_st*)'

For clarity, I specifically omit

OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits<float>)

Only on the offending lines of code in color.cu.

Any thoughts on how to fix this? If it matters, uname/lspci dump:

uname -a

[...] 3.6.11-1.fc17.x86_64 #1 SMP Mon Dec 17 22:16:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

lspci -v | grep nVid

01:00.0 VGA compatible controller: nVidia Corporation GT200b [GeForce GTX 285] (rev a1) (prog-if 00 [VGA controller])

Subsystem: nVidia Corporation Device 065b

2013-01-12 03:31:50 -0600 answered a question How to compile Opencv C files ??

You are asking for argv[1] but you did not pass ./test any arguments? Also your g++ command saves to ./example not ./test. Are these typos or could that be your issue?

2013-01-12 03:22:51 -0600 commented answer [GPU] OpenCV 2.4.2 with Cuda support + Ubuntu 12.04 Laptop

Just wanted to confirm that this also worked for me on Fedora 17, despite the comment saying "//"cuda" library (older versions only)." Thanks!