mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 05:00:54 +08:00
Bugfix: Bitmap ctor throws an exception if we attempt to create an empty bitmap (0, 0).
This commit is contained in:
@@ -50,6 +50,11 @@ namespace openalprnet
|
||||
|
||||
static Bitmap^ MatToBitmap(cv::Mat mat)
|
||||
{
|
||||
if (mat.empty())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const int width = mat.size().width;
|
||||
const int height = mat.size().height;
|
||||
const int channels = mat.channels();
|
||||
|
Reference in New Issue
Block a user