Bugfix: Region of interest.

This commit is contained in:
Peter Rekdal Sunde
2015-08-07 14:34:22 +02:00
parent 3ff3e31bf8
commit 31d502194a

View File

@@ -409,8 +409,9 @@ namespace openalprnet {
/// </summary> /// </summary>
AlprResultsNet^ Recognize(MemoryStream^ memoryStream, List<System::Drawing::Rectangle>^ regionsOfInterest) AlprResultsNet^ Recognize(MemoryStream^ memoryStream, List<System::Drawing::Rectangle>^ regionsOfInterest)
{ {
std::vector<char> p = AlprHelper::MemoryStreamToVector(memoryStream); std::vector<char> buffer = AlprHelper::MemoryStreamToVector(memoryStream);
AlprResults results = m_Impl->recognize(p); std::vector<AlprRegionOfInterest> rois = AlprHelper::ToVector(regionsOfInterest);
AlprResults results = m_Impl->recognize(buffer, rois);
return gcnew AlprResultsNet(results); return gcnew AlprResultsNet(results);
} }
@@ -427,9 +428,9 @@ namespace openalprnet {
/// </summary> /// </summary>
/// <param name="imageBuffer">Bytes representing image data</param> /// <param name="imageBuffer">Bytes representing image data</param>
AlprResultsNet^ Recognize(cli::array<Byte>^ imageBuffer, List<System::Drawing::Rectangle>^ regionsOfInterest) { AlprResultsNet^ Recognize(cli::array<Byte>^ imageBuffer, List<System::Drawing::Rectangle>^ regionsOfInterest) {
std::vector<char> p = AlprHelper::ToVector(imageBuffer); std::vector<char> buffer = AlprHelper::ToVector(imageBuffer);
std::vector<AlprRegionOfInterest> rois = AlprHelper::ToVector(regionsOfInterest); std::vector<AlprRegionOfInterest> rois = AlprHelper::ToVector(regionsOfInterest);
AlprResults results = m_Impl->recognize(p, rois); AlprResults results = m_Impl->recognize(buffer, rois);
return gcnew AlprResultsNet(results); return gcnew AlprResultsNet(results);
} }