2013-05-16 02:45:32 -0600 | received badge | ● Necromancer (source) |
2013-05-15 23:37:16 -0600 | received badge | ● Editor (source) |
2013-05-15 04:19:49 -0600 | answered a question | Speeding up Haartraining with AMD GPU and OpenCL Hi, I tried to get the face detection run as well and tried to make the facedetect demo run. There was a compiler error in an opencl kernel on my mac using an AMD GPU. I posted my solution for that as the answer to another question here in the forum . I had to de-comment the line #108 in my code to move the calculations to the GPU however: just remove the two // and you the haar detection should run on the GPU. |
2013-05-15 04:01:36 -0600 | answered a question | Strange error when trying to use OCL library Hi, The error means that your opencl compiler could not compile some code and quit compiling. I also had a problem trying to get run the face detection on Mac OS X. But I solved it! Here's how:
modules/ocl/src/initialization.cpp tries to compile opencl kernels. unfortunately the ATI/AMD compiler on the mac does not compile opencl kernel. This is what causes the error. To find out which kernel it it I inserted at the beginning of the method the following line: now I can see all kernels that are compiled. The last one before the error causes the crash. I my case it was "integral_cols". A short "grep" command later I knew it was in "modules/ocl/src/opencl/imgproc_integral.cl"
This was a bit of trial and error. I took a program which only compiles opencl kernels. (In my case it was my Qt based test program for openCL), but you may use opencv itself. In that case you always have to patch - make opencl - make install for each iteration which is not nice after all... By commenting out all code with "#if 0" ... "#endif" blocks and slowly de-commenting I deduced which lines did not work. In my case it was some combination of the conditional-operator ("?: operator") and double braces "[][]" in one statement which could not be compiled. I refactored this code. You can see the result here: (the #if 0 block is what not compiled, and the #else branch is my version) the integral_rows kernel had a similar problem and was to be fixed also: (more) |