Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess the reason is that you load your images as color images, not as grayscale. I also suggest you to use the newer C++ interface (i.e. imread instead of loadImage) as also used in the example, see also http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=loadimage#imread