2.0.14
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Inspectron.Camera.UEye
|
||||
_camera = new uEye.Camera();
|
||||
cameraIdx = _settings.CameraId;
|
||||
System.AppDomain.CurrentDomain.ProcessExit += AppDomain_ProcessExit;
|
||||
|
||||
}
|
||||
|
||||
private void AppDomain_ProcessExit(object sender, EventArgs e)
|
||||
@@ -179,10 +180,10 @@ namespace Inspectron.Camera.UEye
|
||||
throw new Exception("failed to save Parameters");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int LastAqTime { get; private set; }
|
||||
private void onFrameEvent(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -191,13 +192,14 @@ namespace Inspectron.Camera.UEye
|
||||
int s32MemId;
|
||||
int active = (int)camera.Memory.GetActive(out s32MemId);
|
||||
int num1 = (int)camera.Memory.Lock(s32MemId);
|
||||
var sw = System.Diagnostics.Stopwatch.StartNew();
|
||||
var image = this.MemoryToImage(s32MemId);
|
||||
int num2 = (int)camera.Memory.Unlock(s32MemId);
|
||||
sw.Stop();
|
||||
LastAqTime = (int)sw.ElapsedMilliseconds;
|
||||
|
||||
|
||||
if (!_channel.Writer.TryWrite(image))
|
||||
{
|
||||
Log.Warning("Image channel is full, dropping image");
|
||||
}
|
||||
int num2 = (int)camera.Memory.Unlock(s32MemId);
|
||||
_channel.Writer.TryWrite(image);
|
||||
}
|
||||
catch (TaskCanceledException ex)
|
||||
{
|
||||
@@ -206,9 +208,6 @@ namespace Inspectron.Camera.UEye
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Channel<Mat> _channel = Channel.CreateBounded<Mat>(new BoundedChannelOptions(1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user