First time here? Check out the FAQ!
answered 2014-07-22 09:35:52 -0600
If you are working with BGR images, you have to call cvtColor like this:
cvtColor(img,out,CV_BGR2YCrCb)
instead of what you are doing.