Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If gray mat is still coloured image, then maybe the problem is on Imgproc.cvtColor. Have you tried using new Mat without parameter?

Mat gray = new Mat();

or, maybe turn it to grayscale and put it back to imgSource should work fine too

Imgproc.cvtColor(imgSource, imgSource, Imgproc.COLOR_BGR2GRAY);