diff --git a/src/bindings/csharp/openalpr-net/openalpr-net.cpp b/src/bindings/csharp/openalpr-net/openalpr-net.cpp index 79239d8..d2d6cde 100644 --- a/src/bindings/csharp/openalpr-net/openalpr-net.cpp +++ b/src/bindings/csharp/openalpr-net/openalpr-net.cpp @@ -368,10 +368,8 @@ namespace openalprnet { /// Recognize from an image on disk /// AlprResultsNet^ Recognize(System::String^ filepath, List^ regionsOfInterest) { - cv::Mat frame = cv::imread( marshal_as(filepath) ); - std::vector rois = AlprHelper::ToVector(regionsOfInterest); - AlprResults results = m_Impl->recognize(frame.data, frame.elemSize(), frame.cols, frame.rows, rois ); - return gcnew AlprResultsNet(results); + array^ byteArray = File::ReadAllBytes(filepath); + return Recognize(byteArray, regionsOfInterest); } ///