How do you debug your algorithms using cv:cuda-functions?


imagine we have developed an algorithm, that has 10 steps and is running on the gpu using only cv::cuda functions. Now we get new example data and run the algorithm, but the results we are getting are wrong.

So we want to debug the code and check for interesting intermediate results of the algorithm. How do you do it? My approach is to have a boolean debug flag and if it is true I copy the GpuMats to the CPU to save it on disk or look at them with ImageWatch in VisualStudio.

What is your procedure? All, from ideas to links to relevant blog post is welcome. Thank you.

1 Like