Util - Rename Prop Ocr -> PlateString

This commit is contained in:
DucDangAnh 2020-06-29 11:41:24 +07:00
parent 5bcea0ba3f
commit 34fc28a0d8
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ namespace AIParkingApplication
//TODO: Check if plateDetected empty //TODO: Check if plateDetected empty
OcrResult plateOcrResultFromEngine = await Util.SendEngineRequestAsync(plateDetected, plateType); OcrResult plateOcrResultFromEngine = await Util.SendEngineRequestAsync(plateDetected, plateType);
Mat finalPlateImage; Mat finalPlateImage;
if (!string.IsNullOrEmpty(plateOcrResultFromEngine.Ocr) && !string.IsNullOrEmpty(plateOcrResultFromEngine.PlateImageBase64)) if (!string.IsNullOrEmpty(plateOcrResultFromEngine.PlateString) && !string.IsNullOrEmpty(plateOcrResultFromEngine.PlateImageBase64))
{ {
byte[] imageData = Convert.FromBase64String(plateOcrResultFromEngine.PlateImageBase64); byte[] imageData = Convert.FromBase64String(plateOcrResultFromEngine.PlateImageBase64);
using (var ms = new MemoryStream(imageData)) using (var ms = new MemoryStream(imageData))
@ -53,7 +53,7 @@ namespace AIParkingApplication
return new FinalPlateResult return new FinalPlateResult
{ {
PlateString = plateOcrResultFromEngine.Ocr, PlateString = plateOcrResultFromEngine.PlateString,
PlateImage = finalPlateImage, PlateImage = finalPlateImage,
PlateType = plateType PlateType = plateType
}; };

View File

@ -92,7 +92,7 @@ namespace AIParkingApplication
public class OcrResult public class OcrResult
{ {
[JsonProperty("ocr")] [JsonProperty("ocr")]
public string Ocr { get; set; } public string PlateString { get; set; }
[JsonProperty("plate")] [JsonProperty("plate")]
public string PlateImageBase64 { get; set; } public string PlateImageBase64 { get; set; }