aleator/CV — pull request #44 by waldheinz (2013-07-23 12:22:24+00:00)
Title: Fixed Image.getChannel not using the MutableImage with the relevant COI

I think I fixed a problem introcuced with the MutableImage type, which causes the following error in OpenCV when using the getChannel function:

OpenCV Error: Assertion failed (src.channels() == dst.channels()) in cvCopy, file /builddir/build/BUILD/opencv-2.4.5/modules/core/src/copy.cpp, line 575
terminate called after throwing an instance of 'cv::Exception'
what(): /builddir/build/BUILD/opencv-2.4.5/modules/core/src/copy.cpp:575: error: (-215) src.channels() == dst.channels() in function cvCopy

I think the problem is that the actual copy is made from the original image instead of the MutableImage where the COI has been set. The proposed change fixes the problem in my application, and in the provided "examples/channels.hs".