From d06c73861dece3ff7566eb857fc63225215b7b17 Mon Sep 17 00:00:00 2001 From: Ariel Elkin Date: Mon, 25 Aug 2014 15:13:13 -0300 Subject: [PATCH] Doc: update video processing tutorial code for OpenCV v2.4.9 and v3a --- doc/tutorials/ios/video_processing/video_processing.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/ios/video_processing/video_processing.rst b/doc/tutorials/ios/video_processing/video_processing.rst index eb5da5b111..9e6905be40 100644 --- a/doc/tutorials/ios/video_processing/video_processing.rst +++ b/doc/tutorials/ios/video_processing/video_processing.rst @@ -199,11 +199,16 @@ From here you can start processing video frames. For example the following snipp { // Do some OpenCV stuff with the image Mat image_copy; - cvtColor(image, image_copy, CV_BGRA2BGR); + cvtColor(image, image_copy, COLOR_BGR2GRAY); // invert image bitwise_not(image_copy, image_copy); - cvtColor(image_copy, image, CV_BGR2BGRA); + + //Convert BGR to BGRA (three channel to four channel) + Mat bgr; + cvtColor(image_copy, bgr, COLOR_GRAY2BGR); + + cvtColor(bgr, image, COLOR_BGR2BGRA); }