PlateProcessor: add method: NormalizePlateString, IsPlateStringValid. Remove commented code in DetectPlateAndDoOcrEngineAsync.
This commit is contained in:
parent
9a2def05a2
commit
8967740d67
|
@ -17,8 +17,8 @@ namespace AIParkingApplication
|
||||||
public Camera(string streamUrl)
|
public Camera(string streamUrl)
|
||||||
{
|
{
|
||||||
this.streamUrl = streamUrl;
|
this.streamUrl = streamUrl;
|
||||||
this.isCapturing = true;
|
isCapturing = true;
|
||||||
this.isFrameRequested = false;
|
isFrameRequested = false;
|
||||||
lockSyncObject = new object();
|
lockSyncObject = new object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,7 @@ namespace AIParkingApplication
|
||||||
private async Task<FinalPlateResult> DetectPlateAndDoOcrEngineAsync(PlateType plateType, Mat frame)
|
private async Task<FinalPlateResult> DetectPlateAndDoOcrEngineAsync(PlateType plateType, Mat frame)
|
||||||
{
|
{
|
||||||
//TODO: check size before resizing
|
//TODO: check size before resizing
|
||||||
//Cv2.Resize(frame, frame, new OpenCvSharp.Size(1280, 720));
|
|
||||||
Mat plateDetected = plateType == PlateType.Square ? squarePlateDetector.DetectPlate(frame) : longPlateDetector.DetectPlate(frame);
|
Mat plateDetected = plateType == PlateType.Square ? squarePlateDetector.DetectPlate(frame) : longPlateDetector.DetectPlate(frame);
|
||||||
//Cv2.ImShow("dasdas", plateDetected);
|
|
||||||
//Cv2.WaitKey(1);
|
|
||||||
//if (plateType == PlateType.Square)
|
|
||||||
//{
|
|
||||||
// //TODO: check size before resizing
|
|
||||||
// Cv2.Resize(plateDetected, plateDetected, new OpenCvSharp.Size(272, 272));
|
|
||||||
//}
|
|
||||||
|
|
||||||
//TODO: check size before resizing
|
//TODO: check size before resizing
|
||||||
Cv2.Resize(plateDetected, plateDetected, new OpenCvSharp.Size(272, 272));
|
Cv2.Resize(plateDetected, plateDetected, new OpenCvSharp.Size(272, 272));
|
||||||
|
@ -92,6 +84,19 @@ namespace AIParkingApplication
|
||||||
return plateResult;
|
return plateResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: Complete this
|
||||||
|
private string NormalizePlateString(string plateString)
|
||||||
|
{
|
||||||
|
return plateString;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: Complete this
|
||||||
|
private bool IsPlateStringValid(string plateString)
|
||||||
|
{
|
||||||
|
bool isValid = true;
|
||||||
|
return isValid;
|
||||||
|
}
|
||||||
|
|
||||||
public class FinalPlateResult
|
public class FinalPlateResult
|
||||||
{
|
{
|
||||||
public string PlateString { get; set; }
|
public string PlateString { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user