Assertion failed (u->origdata == data) in deallocate, using OpenCL
Hello everyone,
I am trying to use OpenCL (OpenCV 3.3) on a Hummingboard i.MX6 which supports OpenCL 1.1 EP.
I've created a small program that tests the color conversion function from OpenCV, using OpenCV and using OpenCL.
void performOpenCL(const std::string &imagePath, bool useOpenCL)
{
cv::Mat image;
cv::UMat output(cv::USAGE_ALLOCATE_HOST_MEMORY);
cv::ocl::setUseOpenCL(useOpenCL);
image = cv::imread(imagePath);
cv::cvtColor(image, output, cv::COLOR_BGR2HLS);
}
Here is the error :
Has anyone experienced this before ? I'm getting exhausted because I don't really know where this can come from. Also, I don't know how to interpret the error lines : do the line starting with (9xx) come from OpenCL or OpenCV ?
Here is the OpenCV GitHub reference : https://github.com/opencv/opencv/blob...
Thank you in advance for your help. :)
imho, your input should be a UMat, too, also in the same memory as the output.
playing with variations of your code above, this approach solved it (it would segfault on win):
Hi @berak,
I modified my code with your pseudo-code :
I don't have the assertion anymore, but I keep having the errors above (syntax error at 'unsigned', undefined identifier, etc). Do you know where it could from ?
the print statements are from somewhere in the ocl module. it tries to precompile a lot of ocl kernels fo library functions, and somewhere, your ocl version does not meet the expectations.
(sorry for being so vague, i just don't know better)