mirror of
https://github.com/opencv/opencv.git
synced 2025-08-01 02:18:01 +08:00
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
This commit is contained in:
parent
2a5e12ccb5
commit
f6b6fbf136
@ -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:
|
If you read a jpg file, a 3 channel image is created by default. If you need a grayscale image, use:
|
||||||
|
|
||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
Mat img = imread(filename, 0);
|
Mat img = imread(filename, IMREAD_GRAYSCALE);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
@note format of the file is determined by its content (first few bytes) Save an image to a file:
|
@note format of the file is determined by its content (first few bytes) Save an image to a file:
|
||||||
|
@ -28,7 +28,7 @@ int main( int argc, char** argv )
|
|||||||
char* imageName = argv[1];
|
char* imageName = argv[1];
|
||||||
|
|
||||||
Mat image;
|
Mat image;
|
||||||
image = imread( imageName, 1 );
|
image = imread( imageName, IMREAD_COLOR );
|
||||||
|
|
||||||
if( argc != 2 || !image.data )
|
if( argc != 2 || !image.data )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user