From f6b6fbf136a57192375564b16a26b87ec43e871b Mon Sep 17 00:00:00 2001 From: Drew Hintz Date: Thu, 25 May 2017 11:10:13 +0200 Subject: [PATCH] change tutorial to use enum name instead of value (#8783) * change tutorial to use enum name instead of value * use enum name instead of value --- doc/tutorials/core/mat_operations.markdown | 2 +- .../introduction/load_save_image/load_save_image.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/core/mat_operations.markdown b/doc/tutorials/core/mat_operations.markdown index 15a9869018..3733d7da40 100644 --- a/doc/tutorials/core/mat_operations.markdown +++ b/doc/tutorials/core/mat_operations.markdown @@ -14,7 +14,7 @@ Load an image from a file: If you read a jpg file, a 3 channel image is created by default. If you need a grayscale image, use: @code{.cpp} - Mat img = imread(filename, 0); + Mat img = imread(filename, IMREAD_GRAYSCALE); @endcode @note format of the file is determined by its content (first few bytes) Save an image to a file: diff --git a/doc/tutorials/introduction/load_save_image/load_save_image.markdown b/doc/tutorials/introduction/load_save_image/load_save_image.markdown index b85c68183d..aa5965d86a 100644 --- a/doc/tutorials/introduction/load_save_image/load_save_image.markdown +++ b/doc/tutorials/introduction/load_save_image/load_save_image.markdown @@ -28,7 +28,7 @@ int main( int argc, char** argv ) char* imageName = argv[1]; Mat image; - image = imread( imageName, 1 ); + image = imread( imageName, IMREAD_COLOR ); if( argc != 2 || !image.data ) {