Ask Your Question

Revision history [back]

You cannot convert an image inplace if the number of channels is different. You have to use another matrix for that.

cv::Mat gray;
cv::cvtColor( frame, gray, CV_BGR2GRAY );