mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-05 19:36:53 +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];
|
||||
cout << fullpath << endl;
|
||||
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));
|
||||
|
||||
imshow ("Original", frame);
|
||||
|
Reference in New Issue
Block a user