32 #include <opencv2/core/core.hpp>
33 #include <opencv2/imgproc/imgproc.hpp>
41 Mat M(height, width, CV_8UC2, img);
44 #if OPENCVDEMO_GRAYSCALE
46 cvtColor(M, image, CV_YUV2GRAY_Y422);
49 Canny(image, image, edgeThresh, edgeThresh * 3);
52 #else // OPENCVDEMO_GRAYSCALE
55 cvtColor(M, image, CV_YUV2BGR_Y422);
57 blur(image, image, Size(5, 5));
60 #endif // OPENCVDEMO_GRAYSCALE