Ask Your Question

Revision history [back]

You are using a float pointer in the CPP function and the kernel, but the GpuMat src is a char image as you are uploading it from input, which is loaded from a JPG image. Use a char pointer instead of a float for src (not dst which is created as a float image) and it should get fine. This doesn't explain (or does it?) the behavior you get when you change the logic, but this is definitely an issue.