1 | initial version |
You need to take care about it. From the documentation of Sobel function you can see that the third argument is ddepth that is the depth of the output image, try to put here CV_16U. Basically here you should provide a depth that avoid overflow. In the docs is well explained by the way, take a look and try it using different depth