mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 16:21:01 +08:00
@@ -65,7 +65,7 @@ namespace openalprnet {
|
|||||||
channels = 4;
|
channels = 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw gcnew NotImplementedException();
|
throw gcnew NotSupportedException(bitmap->PixelFormat.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
BitmapData^ bitmapData = bitmap->LockBits(
|
BitmapData^ bitmapData = bitmap->LockBits(
|
||||||
|
@@ -50,6 +50,11 @@ namespace openalprnet
|
|||||||
|
|
||||||
static Bitmap^ MatToBitmap(cv::Mat mat)
|
static Bitmap^ MatToBitmap(cv::Mat mat)
|
||||||
{
|
{
|
||||||
|
if (mat.empty())
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
const int width = mat.size().width;
|
const int width = mat.size().width;
|
||||||
const int height = mat.size().height;
|
const int height = mat.size().height;
|
||||||
const int channels = mat.channels();
|
const int channels = mat.channels();
|
||||||
|
Reference in New Issue
Block a user