Class LicensePlateTemporalTracker
- Namespace
- CapCognition.Net.LicensePlateDetection.CapCognitionLicensePlateTracking
- Assembly
- CapCognition.Net.LicensePlateDetection.dll
Converts frame-based CapCognition license plate detections into a stable temporal single-vehicle result. The class is thread-safe.
public sealed class LicensePlateTemporalTracker : IDisposable
- Inheritance
-
LicensePlateTemporalTracker
- Implements
- Inherited Members
Constructors
LicensePlateTemporalTracker(LicensePlateTrackerOptions)
Creates a tracker with caller-supplied options and the system clock.
public LicensePlateTemporalTracker(LicensePlateTrackerOptions options)
Parameters
optionsLicensePlateTrackerOptionsMutable options used while processing frames.
LicensePlateTemporalTracker(LicensePlateTrackerOptions, TimeProvider)
Creates a tracker with caller-supplied options and an explicit clock for deterministic frame processing.
public LicensePlateTemporalTracker(LicensePlateTrackerOptions options, TimeProvider timeProvider)
Parameters
optionsLicensePlateTrackerOptionsMutable options used while processing frames.
timeProviderTimeProviderClock used to timestamp observations and expire evidence.
LicensePlateTemporalTracker(LicensePlateTrackingMode, LicensePlateTextMode)
Creates a tracker with the recommended options for a tracking mode.
public LicensePlateTemporalTracker(LicensePlateTrackingMode mode, LicensePlateTextMode textMode = LicensePlateTextMode.PreferValidated)
Parameters
modeLicensePlateTrackingModeMode whose recommended options are used.
textModeLicensePlateTextModeHow raw and validated OCR texts are selected.
Properties
CurrentPlate
Gets the currently published stabilized plate, or null when no plate is published.
public string? CurrentPlate { get; }
Property Value
CurrentState
Gets the state of the currently published result, or null when no plate is published.
public StableLicensePlateState? CurrentState { get; }
Property Value
HasPublishedPlate
Gets whether the tracker currently exposes a stabilized plate.
public bool HasPublishedPlate { get; }
Property Value
Mode
Gets the operating mode that determines the tracker thresholds and lifecycle behavior.
public LicensePlateTrackingMode Mode { get; }
Property Value
Methods
CreateCallback()
Convenience method for APIs requiring an explicit GraphicProcessorControl.ResultDeliveryCallback instance.
public GraphicProcessorControl.ResultDeliveryCallback CreateCallback()
Returns
- GraphicProcessorControl.ResultDeliveryCallback
A callback that forwards recognition results to this tracker.
Dispose()
Releases all internally retained bitmap copies and prevents further processing.
public void Dispose()
NextCar()
Explicitly starts recognition of the next vehicle. Primarily intended for ParkingOfficer mode.
public void NextCar()
Process(SKBitmap, RecognitionResult)
Processes one recognition callback/frame.
public void Process(SKBitmap bitmap, RecognitionResult result)
Parameters
bitmapSKBitmapSource image for this frame. It is read only and remains caller-owned.
resultRecognitionResultRecognition results for this frame. They are read only and remain caller-owned.
Reset(bool)
Clears all temporal evidence and the currently published plate.
public void Reset(bool emitRemoved = false)
Parameters
emitRemovedboolWhether to raise a removed result before clearing a published plate.
ResultCallback(SKBitmap, RecognitionResult)
Callback method with exactly the CapCognition ResultDeliveryCallback signature.
It can be passed directly to the recognition pipeline on .NET and MAUI.
public void ResultCallback(SKBitmap bitmap, RecognitionResult result)
Parameters
bitmapSKBitmapSource image for this recognition callback. Ownership remains with the caller.
resultRecognitionResultRecognition results for this source image. Ownership remains with the caller.
Events
ResultChanged
Raised whenever the externally visible stable result changes. The receiver owns the returned StableLicensePlateResult and should dispose it when done.
public event Action<LicensePlateTemporalTracker, StableLicensePlateResult>? ResultChanged