mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 04:26:52 +08:00
Bugfix: Skip processing if opencv cannot load image.
This commit is contained in:
@@ -123,6 +123,11 @@ int main( int argc, const char** argv )
|
|||||||
string fullpath = inDir + "/" + files[i];
|
string fullpath = inDir + "/" + files[i];
|
||||||
cout << fullpath << endl;
|
cout << fullpath << endl;
|
||||||
frame = imread( fullpath.c_str() );
|
frame = imread( fullpath.c_str() );
|
||||||
|
if(frame.data == NULL)
|
||||||
|
{
|
||||||
|
cout << "Unable to read license plate: " << fullpath << endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
resize(frame, frame, Size(config.ocrImageWidthPx, config.ocrImageHeightPx));
|
resize(frame, frame, Size(config.ocrImageWidthPx, config.ocrImageHeightPx));
|
||||||
|
|
||||||
imshow ("Original", frame);
|
imshow ("Original", frame);
|
||||||
|
Reference in New Issue
Block a user