mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +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
@@ -456,7 +456,7 @@ int main( int argc, char** argv )
|
||||
view0.copyTo(view);
|
||||
}
|
||||
else if( i < (int)imageList.size() )
|
||||
view = imread(imageList[i], 1);
|
||||
view = imread(imageList[i], IMREAD_COLOR);
|
||||
|
||||
if(view.empty())
|
||||
{
|
||||
@@ -581,7 +581,7 @@ int main( int argc, char** argv )
|
||||
|
||||
for( i = 0; i < (int)imageList.size(); i++ )
|
||||
{
|
||||
view = imread(imageList[i], 1);
|
||||
view = imread(imageList[i], IMREAD_COLOR);
|
||||
if(view.empty())
|
||||
continue;
|
||||
remap(view, rview, map1, map2, INTER_LINEAR);
|
||||
|
||||
Reference in New Issue
Block a user