forked from amkovkov/GranuSightSoftware2
fix: typos
TOO many typos
This commit is contained in:
+12
-12
@@ -79,23 +79,23 @@ public partial class Program
|
||||
Description = "Output image file",
|
||||
DefaultValueFactory = (_) => new FileInfo("image.png")
|
||||
};
|
||||
private static readonly Option<double> _captureIntencityWhite = new("--intencity-white")
|
||||
private static readonly Option<double> _captureIntensityWhite = new("--intensity-white")
|
||||
{
|
||||
Description = "Illuminator intencity for white (from 0 to 1)",
|
||||
Description = "Illuminator intensity for white (from 0 to 1)",
|
||||
DefaultValueFactory = (_) => 1
|
||||
};
|
||||
private static readonly Option<double> _captureIntencityUv365nm = new("--intencity-uv365nm")
|
||||
private static readonly Option<double> _captureIntensityUv365nm = new("--intensity-uv365nm")
|
||||
{
|
||||
Description = "Illuminator intencity for UV 365 nm (from 0 to 1)",
|
||||
Description = "Illuminator intensity for UV 365 nm (from 0 to 1)",
|
||||
DefaultValueFactory = (_) => 0
|
||||
};
|
||||
private static readonly Option<double> _captureIntencityUv254nm = new("--intencity-uv254nm")
|
||||
private static readonly Option<double> _captureIntensityUv254nm = new("--intensity-uv254nm")
|
||||
{
|
||||
Description = "Illuminator intencity for UV 254 nm (from 0 to 1)",
|
||||
Description = "Illuminator intensity for UV 254 nm (from 0 to 1)",
|
||||
DefaultValueFactory = (_) => 0
|
||||
};
|
||||
|
||||
private static readonly Command _imageStorageClearCommand = new("image-storage-clear")
|
||||
private static readonly Command _imageStorageClear = new("image-storage-clear")
|
||||
{
|
||||
Description = "Clear image storage from unused images"
|
||||
};
|
||||
@@ -126,12 +126,12 @@ public partial class Program
|
||||
_rootCommand.Add(_captureCommand);
|
||||
_captureCommand.SetAction(Capture);
|
||||
_captureCommand.Add(_captureOutputFile);
|
||||
_captureCommand.Add(_captureIntencityWhite);
|
||||
_captureCommand.Add(_captureIntencityUv365nm);
|
||||
_captureCommand.Add(_captureIntencityUv254nm);
|
||||
_captureCommand.Add(_captureIntensityWhite);
|
||||
_captureCommand.Add(_captureIntensityUv365nm);
|
||||
_captureCommand.Add(_captureIntensityUv254nm);
|
||||
|
||||
_rootCommand.Add(_imageStorageClearCommand);
|
||||
_imageStorageClearCommand.SetAction(ImageStorageClear);
|
||||
_rootCommand.Add(_imageStorageClear);
|
||||
_imageStorageClear.SetAction(ImageStorageClear);
|
||||
|
||||
Console.CancelKeyPress += new ConsoleCancelEventHandler(OnProgramShutdown);
|
||||
Console.WriteLine("Press Ctrl+C to shut down.");
|
||||
|
||||
@@ -108,7 +108,7 @@ public partial class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Exception occured while image capturing");
|
||||
_logger.LogError(ex, "Exception occurred while image capturing");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public partial class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Exception occured while image saving");
|
||||
_logger.LogError(ex, "Exception occurred while image saving");
|
||||
}
|
||||
|
||||
try
|
||||
@@ -147,7 +147,7 @@ public partial class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Exception occured while gains computing");
|
||||
_logger.LogError(ex, "Exception occurred while gains computing");
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
||||
+17
-17
@@ -21,32 +21,32 @@ public partial class Program
|
||||
private readonly CameraService _cameraService;
|
||||
private readonly IlluminatorService _illuminatorService;
|
||||
private readonly FileInfo _outputFile;
|
||||
private readonly double _intencityWhite;
|
||||
private readonly double _intencityUv365nm;
|
||||
private readonly double _intencityUv254nm;
|
||||
private readonly double _intensityWhite;
|
||||
private readonly double _intensityUv365nm;
|
||||
private readonly double _intensityUv254nm;
|
||||
|
||||
public CaptureWorker(ILogger<CaptureWorker> logger, IHostApplicationLifetime applicationLifetime, CameraService cameraService, IlluminatorService illuminatorService, FileInfo outputFile, double intencityWhite, double intencityUv365nm, double intencityUv254nm)
|
||||
public CaptureWorker(ILogger<CaptureWorker> logger, IHostApplicationLifetime applicationLifetime, CameraService cameraService, IlluminatorService illuminatorService, FileInfo outputFile, double intensityWhite, double intensityUv365nm, double intensityUv254nm)
|
||||
{
|
||||
_applicationLifetime = applicationLifetime;
|
||||
_logger = logger;
|
||||
_cameraService = cameraService;
|
||||
_illuminatorService = illuminatorService;
|
||||
_outputFile = outputFile;
|
||||
_intencityWhite = intencityWhite;
|
||||
_intencityUv365nm = intencityUv365nm;
|
||||
_intencityUv254nm = intencityUv254nm;
|
||||
_intensityWhite = intensityWhite;
|
||||
_intensityUv365nm = intensityUv365nm;
|
||||
_intensityUv254nm = intensityUv254nm;
|
||||
|
||||
_logger.LogInformation("Initialized");
|
||||
_logger.LogInformation("Output File: {}", _outputFile);
|
||||
_logger.LogInformation("Intencity White: {}", _intencityWhite);
|
||||
_logger.LogInformation("Intencity UV 365 nm: {}", _intencityUv365nm);
|
||||
_logger.LogInformation("Intencity UV 254 nm: {}", _intencityUv254nm);
|
||||
_logger.LogInformation("Intensity White: {}", _intensityWhite);
|
||||
_logger.LogInformation("Intensity UV 365 nm: {}", _intensityUv365nm);
|
||||
_logger.LogInformation("Intensity UV 254 nm: {}", _intensityUv254nm);
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
_logger.LogInformation("Running camera fine tuning");
|
||||
_illuminatorService.SetIntensity(_intencityWhite, _intencityUv365nm, _intencityUv254nm);
|
||||
_illuminatorService.SetIntensity(_intensityWhite, _intensityUv365nm, _intensityUv254nm);
|
||||
_illuminatorService.TurnOn();
|
||||
|
||||
Mat? image;
|
||||
@@ -63,7 +63,7 @@ public partial class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical(ex, "Exception occured while image capturing");
|
||||
_logger.LogCritical(ex, "Exception occurred while image capturing");
|
||||
_applicationLifetime.StopApplication();
|
||||
return;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public partial class Program
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical(ex, "Exception occured while image saving");
|
||||
_logger.LogCritical(ex, "Exception occurred while image saving");
|
||||
}
|
||||
|
||||
_applicationLifetime.StopApplication();
|
||||
@@ -89,9 +89,9 @@ public partial class Program
|
||||
private static void Capture(ParseResult parseResult)
|
||||
{
|
||||
var outputFile = parseResult.GetRequiredValue(_captureOutputFile);
|
||||
var intencityWhite = parseResult.GetRequiredValue(_captureIntencityWhite);
|
||||
var intencityUv365nm = parseResult.GetRequiredValue(_captureIntencityUv365nm);
|
||||
var intencityUv254nm = parseResult.GetRequiredValue(_captureIntencityUv254nm);
|
||||
var intensityWhite = parseResult.GetRequiredValue(_captureIntensityWhite);
|
||||
var intensityUv365nm = parseResult.GetRequiredValue(_captureIntensityUv365nm);
|
||||
var intensityUv254nm = parseResult.GetRequiredValue(_captureIntensityUv254nm);
|
||||
|
||||
var builder = Host.CreateApplicationBuilder();
|
||||
|
||||
@@ -111,7 +111,7 @@ public partial class Program
|
||||
var applicationLifetime = services.GetRequiredService<IHostApplicationLifetime>();
|
||||
var cameraService = services.GetRequiredService<CameraService>();
|
||||
var illuminatorService = services.GetRequiredService<IlluminatorService>();
|
||||
return new CaptureWorker(logger, applicationLifetime, cameraService, illuminatorService, outputFile, intencityWhite, intencityUv365nm, intencityUv254nm);
|
||||
return new CaptureWorker(logger, applicationLifetime, cameraService, illuminatorService, outputFile, intensityWhite, intensityUv365nm, intensityUv254nm);
|
||||
});
|
||||
|
||||
var host = builder.Build();
|
||||
|
||||
@@ -16,14 +16,14 @@ namespace GSS2.Test;
|
||||
|
||||
public partial class Program
|
||||
{
|
||||
private class ImagesStorateClearWorker : BackgroundService
|
||||
private class ImagesStorageClearWorker : BackgroundService
|
||||
{
|
||||
private readonly ILogger<ImagesStorateClearWorker> _logger;
|
||||
private readonly ILogger<ImagesStorageClearWorker> _logger;
|
||||
private readonly IHostApplicationLifetime _applicationLifetime;
|
||||
private readonly AmineContentCalibrationContext _context;
|
||||
private readonly ImageStorageService _imageStorageService;
|
||||
|
||||
public ImagesStorateClearWorker(ILogger<ImagesStorateClearWorker> logger, IHostApplicationLifetime applicationLifetime, AmineContentCalibrationContext context, ImageStorageService imageStorageService)
|
||||
public ImagesStorageClearWorker(ILogger<ImagesStorageClearWorker> logger, IHostApplicationLifetime applicationLifetime, AmineContentCalibrationContext context, ImageStorageService imageStorageService)
|
||||
{
|
||||
_logger = logger;
|
||||
_applicationLifetime = applicationLifetime;
|
||||
@@ -85,7 +85,7 @@ public partial class Program
|
||||
builder.Services.AddAmineContentCalibrationContext(builder.Configuration);
|
||||
builder.Services.AddImageStorageService(new DirectoryInfo("images"));
|
||||
|
||||
builder.Services.AddHostedService<ImagesStorateClearWorker>();
|
||||
builder.Services.AddHostedService<ImagesStorageClearWorker>();
|
||||
|
||||
var host = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user