Table of Contents

Class LocalModelStreamHelpers

Namespace
CapCognition.Net.LicensePlateDetection.Common.Extensions
Assembly
CapCognition.Net.LicensePlateDetection.dll
public static class LocalModelStreamHelpers
Inheritance
LocalModelStreamHelpers
Inherited Members

Methods

UseLocalLicensePlateModelFromType(LoadedLocalModelStreams, LPModelType)

Builder method to set the license plate model stream based on the provided LPModelType and the recognition mode. It checks the recognition mode to determine if a country model is needed and constructs the appropriate file path for the model stream. If the recognition mode is VehicleOnly, it returns the original modelStreams without setting a license plate model stream. Otherwise, it sets the LpModelStream property of the modelStreams with a new ModelStreamInfo based on the determined file path. The method throws an ArgumentException if an invalid LPModelType is provided.

public static LoadedLocalModelStreams UseLocalLicensePlateModelFromType(this LoadedLocalModelStreams modelStreams, LPModelType lpModelType)

Parameters

modelStreams LoadedLocalModelStreams
lpModelType LPModelType

Returns

LoadedLocalModelStreams

Exceptions

ArgumentException

UseLocalLicensePlateTextModelFromType(LoadedLocalModelStreams, LPTextModelType)

Builder method to set the license plate text model stream based on the provided LPTextModelType and the recognition mode. It checks the recognition mode to determine if a country model is needed and constructs the appropriate file path for the model stream. If the recognition mode is VehicleOnly, it returns the original modelStreams without setting a license plate text model stream. Otherwise, it sets the LpTextModelStream property of the modelStreams with a new ModelStreamInfo based on the determined file path. The method throws an ArgumentOutOfRangeException if an invalid LPTextModelType is provided.

public static LoadedLocalModelStreams UseLocalLicensePlateTextModelFromType(this LoadedLocalModelStreams modelStreams, LPTextModelType lpTextModelType)

Parameters

modelStreams LoadedLocalModelStreams
lpTextModelType LPTextModelType

Returns

LoadedLocalModelStreams

Exceptions

ArgumentOutOfRangeException

UseLocalVehicleModelFromType(LoadedLocalModelStreams, VehicleModelType)

Builder method to set the vehicle model stream based on the provided VehicleModelType and the recognition mode. It checks the recognition mode to determine if a vehicle model is needed and constructs the appropriate file path for the model stream. If the recognition mode is CountryLicencePlateOnly or NoCountryLicencePlateOnly, it returns the original modelStreams without setting a vehicle model stream. Otherwise, it sets the VehicleModelStream property of the modelStreams with a new ModelStreamInfo based on the determined file path. The method throws an ArgumentException if an invalid VehicleModelType is provided.

public static LoadedLocalModelStreams UseLocalVehicleModelFromType(this LoadedLocalModelStreams modelStreams, VehicleModelType vehicleModelType)

Parameters

modelStreams LoadedLocalModelStreams
vehicleModelType VehicleModelType

Returns

LoadedLocalModelStreams

Exceptions

ArgumentException