mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #23108 from crackwitz:issue-23107
Usage of imread(): magic number 0, unchecked result * docs: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread() * samples, apps: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread() * tests: rewrite 0/1 to IMREAD_GRAYSCALE/IMREAD_COLOR in imread() * doc/py_tutorials: check imread() result
This commit is contained in:
committed by
GitHub
parent
7b7774476e
commit
a64b51dd94
@@ -406,7 +406,7 @@ TEST( Features2d_DescriptorExtractor, batch_ORB )
|
||||
for( i = 0; i < n; i++ )
|
||||
{
|
||||
string imgname = format("%s/img%d.png", path.c_str(), i+1);
|
||||
Mat img = imread(imgname, 0);
|
||||
Mat img = imread(imgname, IMREAD_GRAYSCALE);
|
||||
imgs.push_back(img);
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ TEST( Features2d_DescriptorExtractor, batch_SIFT )
|
||||
for( i = 0; i < n; i++ )
|
||||
{
|
||||
string imgname = format("%s/img%d.png", path.c_str(), i+1);
|
||||
Mat img = imread(imgname, 0);
|
||||
Mat img = imread(imgname, IMREAD_GRAYSCALE);
|
||||
imgs.push_back(img);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user