Class LicensePlateDetectionRecognitionOptionBuilder
- Assembly
- CapCognition.Net.LicensePlateDetection.dll
public class LicensePlateDetectionRecognitionOptionBuilder
- Inheritance
-
LicensePlateDetectionRecognitionOptionBuilder
- Inherited Members
Constructors
LicensePlateDetectionRecognitionOptionBuilder(RecognitionOptionBuilder, Action<LicensePlateDetectionRecognitionOptions>)
public LicensePlateDetectionRecognitionOptionBuilder(RecognitionOptionBuilder parent, Action<LicensePlateDetectionRecognitionOptions> onDone)
Parameters
Methods
ConfigureOption(Action<LicensePlateDetectionRecognitionOptions>)
Gives the option to configure the LicensePlateDetectionRecognitionOption and directly calling methods on the option.
public LicensePlateDetectionRecognitionOptionBuilder ConfigureOption(Action<LicensePlateDetectionRecognitionOptions> configAction)
Parameters
configActionAction<LicensePlateDetectionRecognitionOptions>
Returns
DeliverPlatePictureInResult(bool)
Set the true to include the plate picture in the result.
public LicensePlateDetectionRecognitionOptionBuilder DeliverPlatePictureInResult(bool value = true)
Parameters
valuebool
Returns
DoAutomaticDetectionOptimization(bool)
Set the true to do optimization of the processing methods when the models are loaded the first time. Only enable when using the models for multiple detections.
public LicensePlateDetectionRecognitionOptionBuilder DoAutomaticDetectionOptimization(bool value = true)
Parameters
valuebool
Returns
Done()
Call this when done configuring this option Note: This method has to be the last method called in the builder chain.
public RecognitionOptionBuilder Done()
Returns
SetPlateModelQuality(QualityPlateModel)
Set the quality of the license plate model. Only use this when you want to override the default quality. Note: When passing a model by stream, the quality is ignored.
public LicensePlateDetectionRecognitionOptionBuilder SetPlateModelQuality(LicensePlateDetectionRecognitionOptions.QualityPlateModel quality)
Parameters
Returns
SetRecognitionQuality(RecognitionQuality)
Sets the recognition quality for license plate detection. Note: When passing a model by stream, the quality is ignored.
public LicensePlateDetectionRecognitionOptionBuilder SetRecognitionQuality(LicensePlateDetectionRecognitionOptionBuilder.RecognitionQuality quality)
Parameters
qualityLicensePlateDetectionRecognitionOptionBuilder.RecognitionQualityThe desired recognition quality level to be set. This parameter determines the accuracy and speed of the recognition process.
Returns
- LicensePlateDetectionRecognitionOptionBuilder
The current instance of LicensePlateDetectionRecognitionOptionBuilder to allow for method chaining.
SetTextModelQuality(QualityTextModel)
Set the quality of the text model. Only use this when you want to override the default quality. Note: When passing a model by stream, the quality is ignored.
public LicensePlateDetectionRecognitionOptionBuilder SetTextModelQuality(LicensePlateDetectionRecognitionOptions.QualityTextModel quality)
Parameters
Returns
SetTextWideModelQuality(QualityTextWideModel)
Set the quality of the text model. Only use this when you want to override the default quality. Note: When passing a model by stream, the quality is ignored.
public LicensePlateDetectionRecognitionOptionBuilder SetTextWideModelQuality(LicensePlateDetectionRecognitionOptions.QualityTextWideModel quality)
Parameters
Returns
SetVehicleModelQuality(QualityVehicleModel)
Set the quality of the vehicle model. Only use this when you want to override the default quality. Note: When passing a model by stream, the quality is ignored.
public LicensePlateDetectionRecognitionOptionBuilder SetVehicleModelQuality(LicensePlateDetectionRecognitionOptions.QualityVehicleModel quality)
Parameters
Returns
UseCroppedImageForRecognition()
Use cropped image for recognition. The image will be cropped (stretched) to fill the recognition area. Depending on the image aspect ratio, the image might be stretched horizontally or vertically so only the center part is taken for the recognition.
-------------------
| |
|................|
| |
| Recognized |
| |
| |
|................|
| |
| |
-------------------
public LicensePlateDetectionRecognitionOptionBuilder UseCroppedImageForRecognition()
Returns
UseCudaProvider(bool)
Set the true to use the CUDA provider for the recognition. Note: Only enable when cuda toolkit (https://developer.nvidia.com/cuda-downloads) and CUDNN (https://developer.nvidia.com/cudnn) are installed. Only available for Windows and Linux. Under ARM64 or ARM32, the CUDA provider is not available.
public LicensePlateDetectionRecognitionOptionBuilder UseCudaProvider(bool value = true)
Parameters
valuebool
Returns
UseFittedImageForRecognition()
Use a fitted image for recognition. The image will be resized to fit the recognition area.
-------------------
| b. . b|
| l. . l|
| a. Recognized . a|
| c. . c|
| k. . k|
| . . |
-------------------
public LicensePlateDetectionRecognitionOptionBuilder UseFittedImageForRecognition()
Returns
UseLocalModelsForRecognitionMode(RecognitionModeType)
Automated mode for loading the models from the local file system by specifying the recognition mode. The models have to be stored in the local file system with the correct naming convention for this to work. Sets the recognition mode for license plate detection by specifying the local model streams to use.
public LoadedLocalModelStreams UseLocalModelsForRecognitionMode(LicensePlateDetectionRecognitionOptions.RecognitionModeType recognitionType)
Parameters
recognitionTypeLicensePlateDetectionRecognitionOptions.RecognitionModeType
Returns
UseRecognitionModeCountryLicencePlateOnly(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the country license plate, then the license plate text.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeCountryLicencePlateOnly(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality
Returns
UseRecognitionModeCountryLicencePlateThenVehicle(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the country license plate, then the license plate text, and if possible the vehicle type surrounding the license plate. If no plate is detected, no result is returned.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeCountryLicencePlateThenVehicle(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? vehicleModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
vehicleModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the vehicle model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality
Returns
UseRecognitionModeNoCountryLicencePlateOnly(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the license plate, then the license plate text.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeNoCountryLicencePlateOnly(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality
Returns
UseRecognitionModeNoCountryLicencePlateThenVehicle(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the license plate, then the license plate text, and if possible the vehicle type surrounding the license plate. If no plate is detected, no result is returned.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeNoCountryLicencePlateThenVehicle(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? vehicleModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
vehicleModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the vehicle model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality
Returns
UseRecognitionModeVehicleOnly(ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. It only tries to detect the vehicle type.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeVehicleOnly(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? vehicleModelStream = null)
Parameters
vehicleModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the vehicle model quality
Returns
UseRecognitionModeVehicleThenCountryLicencePlate(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the vehicle type, then the country license plate and the license plate text of the detected vehicle. If no vehicle is detected, no result is returned.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeVehicleThenCountryLicencePlate(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? vehicleModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
vehicleModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the vehicle model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality
Returns
UseRecognitionModeVehicleThenNoCountryLicencePlate(ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?, ModelStreamInfo?)
Manual mode for loading the models from the local file system by specifying the local model streams to use. This method is used when the models are loaded from the local file system but not with the correct naming convention or when the models are stored in different folders. Sets the recognition mode for license plate detection. First, it will try to detect the vehicle type, then the license plate and the license plate text of the detected vehicle. If no vehicle is detected, no result is returned.
public LicensePlateDetectionRecognitionOptionBuilder UseRecognitionModeVehicleThenNoCountryLicencePlate(LicensePlateDetectionRecognitionOptions.ModelStreamInfo? plateModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? vehicleModelStream = null, LicensePlateDetectionRecognitionOptions.ModelStreamInfo? textWideModelStream = null)
Parameters
plateModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the plate model quality
textModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text model quality
vehicleModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the vehicle model quality
textWideModelStreamLicensePlateDetectionRecognitionOptions.ModelStreamInfoIf not set, the model is loaded from the internet based on the text wide model quality