Skip to content

Commit f6b6fbf

Browse files
adhintzvpisarev
authored andcommitted
change tutorial to use enum name instead of value (opencv#8783)
* change tutorial to use enum name instead of value * use enum name instead of value
1 parent 2a5e12c commit f6b6fbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/tutorials/core/mat_operations.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Load an image from a file:
1414
If you read a jpg file, a 3 channel image is created by default. If you need a grayscale image, use:
1515

1616
@code{.cpp}
17-
Mat img = imread(filename, 0);
17+
Mat img = imread(filename, IMREAD_GRAYSCALE);
1818
@endcode
1919

2020
@note format of the file is determined by its content (first few bytes) Save an image to a file:

doc/tutorials/introduction/load_save_image/load_save_image.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main( int argc, char** argv )
2828
char* imageName = argv[1];
2929

3030
Mat image;
31-
image = imread( imageName, 1 );
31+
image = imread( imageName, IMREAD_COLOR );
3232

3333
if( argc != 2 || !image.data )
3434
{

0 commit comments

Comments
 (0)