Ask Your Question

Revision history [back]

error: ‘Canny’ is not a member of ‘cv::gpu’

Hello all,

I am using OpenCV 2.4.9 with Cuda support on Funtoo Linux (installed via Portage).

While compiling a project made with a former version of OpenCV, the compiler tells me

error: ‘Canny’ is not a member of ‘cv::gpu’

AFAIK this means the compiler couldn't find the relevant function. It then tells me I might want to use cv::Canny instead.

I see that in OpenCV 3, cv::gpu:: will be moved to cv::cuda::. However, I'm using 2.4.9, so I assume that's not related. I read the online documentation, and I can see Canny in cv::gpu::, so I'm not sure what's wrong here: http://docs.opencv.org/modules/gpu/doc/image_processing.html?highlight=gpu%20canny#gpu-canny

How can I use the Cuda GPGPU version of the Canny filter in OpenCV?

I'm going to use the CPU version cv::Canny instead, since it seems I can't use cv::gpu::Canny. Does this one automagically use CUDA if available?

Best regards.

error: ‘Canny’ is not a member of ‘cv::gpu’

Hello all,

I am using OpenCV 2.4.9 with Cuda support on Funtoo Linux (installed via Portage).

Here is the offending method:

cv::gpu::GpuMat edgesR;
cv::gpu::GpuMat img;
img.create(getN(), getM(), CV_8UC1);
cv::gpu::Canny(img, edgesR, 120.0, 30.0, 3);

While compiling a project made with a former version of OpenCV, the compiler tells me

error: ‘Canny’ is not a member of ‘cv::gpu’

AFAIK this means the compiler couldn't find the relevant function. It then tells me I might want to use cv::Canny instead.

I see that in OpenCV 3, cv::gpu:: will be moved to cv::cuda::. However, I'm using 2.4.9, so I assume that's not related. I read the online documentation, and I can see Canny in cv::gpu::, so I'm not sure what's wrong here: http://docs.opencv.org/modules/gpu/doc/image_processing.html?highlight=gpu%20canny#gpu-canny

How can I use the Cuda GPGPU version of the Canny filter in OpenCV?

I'm going to use the CPU version cv::Canny instead, since it seems I can't use cv::gpu::Canny. Does this one automagically use CUDA if available?

EDIT: Turns out using cv::Canny instead of cv::gpu::Canny throws an assert error:

openCV Error: Assertion failed (k == STD_VECTOR_MAT) in getMat, file /var/tmp/portage/media-libs/opencv-2.4.9/work/opencv-2.4.9/modules/core/src/matrix.cpp, line 988
terminate called after throwing an instance of 'cv::Exception'
  what():  /var/tmp/portage/media-libs/opencv-2.4.9/work/opencv-2.4.9/modules/core/src/matrix.cpp:988: error: (-215) k == STD_VECTOR_MAT in function getMat

Best regards.

error: Running the Canny filter on the GPU (error: ‘Canny’ is not a member of ‘cv::gpu’‘cv::gpu’)

Hello all,

I am using OpenCV 2.4.9 with Cuda support on Funtoo Linux (installed via Portage).

Here is the offending method:

cv::gpu::GpuMat edgesR;
cv::gpu::GpuMat img;
img.create(getN(), getM(), CV_8UC1);
cv::gpu::Canny(img, edgesR, 120.0, 30.0, 3);

While compiling a project made with a former version of OpenCV, the compiler tells me

error: ‘Canny’ is not a member of ‘cv::gpu’

AFAIK this means the compiler couldn't find the relevant function. It then tells me I might want to use cv::Canny instead.

I see that in OpenCV 3, cv::gpu:: will be moved to cv::cuda::. However, I'm using 2.4.9, so I assume that's not related. I read the online documentation, and I can see Canny in cv::gpu::, so I'm not sure what's wrong here: http://docs.opencv.org/modules/gpu/doc/image_processing.html?highlight=gpu%20canny#gpu-canny

How can I use the Cuda GPGPU version of the Canny filter in OpenCV?

I'm going to use the CPU version cv::Canny instead, since it seems I can't use cv::gpu::Canny. Does this one automagically use CUDA if available?

EDIT: Turns out using cv::Canny instead of cv::gpu::Canny throws an assert error:

openCV Error: Assertion failed (k == STD_VECTOR_MAT) in getMat, file /var/tmp/portage/media-libs/opencv-2.4.9/work/opencv-2.4.9/modules/core/src/matrix.cpp, line 988
terminate called after throwing an instance of 'cv::Exception'
  what():  /var/tmp/portage/media-libs/opencv-2.4.9/work/opencv-2.4.9/modules/core/src/matrix.cpp:988: error: (-215) k == STD_VECTOR_MAT in function getMat

Best regards.