I work on project to apply meanshift in opencv on some images, after four or five tries i get this error, i tried something like closing configuration and so on but none of them doesn't work. any help appreciate it. my opencv 2.4.9, and my graphic cart is NVIDIA GeForce 310.
OpenCV Error: Gpu API call (CL_INVALID_COMMAND_QUEUE) in openCLMemcpy2D, file /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20140617-1410/modules/ocl/src/cl_operations.cpp, line 227
[ERROR] [1405642960.704963701]: Exception thrown while processing service call: /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20140617-1410/modules/ocl/src/cl_operations.cpp:227: error: (-217) CL_INVALID_COMMAND_QUEUE in function openCLMemcpy2D
[ERROR] [1405642960.705466283]: Service call failed: service [/jur_segmentation_interaction] responded with an error: /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20140617-1410/modules/ocl/src/cl_operations.cpp:227: error: (-217) CL_INVALID_COMMAND_QUEUE in function openCLMemcpy2D
=================> code
/// Applying MeanShift
cv::ocl::oclMat ocl_image;
cv::Mat res_mean;
// Converting to CV_8UC4
cv::Mat _img_conv;
cvtColor( _img , _img_conv , CV_BGR2BGRA );
ocl_image.upload(_img_conv.clone());
cv::ocl::meanShiftSegmentation( ocl_image.clone() , res_mean , _sp , _sr , _mean_size );
//cv::ocl::finish();
====================> opencl configuration:
cv::ocl::DevicesInfo dev_info;
cv::ocl::getOpenCLDevices( dev_info );
/// Platform Info
cv::ocl::PlatformsInfo plat_info;
cv::ocl::getOpenCLPlatforms( plat_info );
cv::ocl::setDevice( dev_info[0] );