hawkeye camera support(not tested)
This commit is contained in:
@@ -24,7 +24,6 @@ namespace Inspectron.Camera.UEye
|
||||
int cameraIdx;
|
||||
|
||||
|
||||
|
||||
public IDSImageSource(IDSImageSourceSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
@@ -68,8 +67,7 @@ namespace Inspectron.Camera.UEye
|
||||
|
||||
Byte[] u8img;
|
||||
_camera.Memory.CopyToArray(idx, out u8img);
|
||||
//Console.WriteLine($"Image size: {size.Width}x{size.Height}, channels: {channels}({mode}), data size: {u8img.Length}, pitch: {pitch}");
|
||||
//Console.ReadLine();
|
||||
|
||||
Mat mat = new Mat(size.Height,pitch, MatType.CV_8UC(channels));
|
||||
mat.SetArray(u8img);
|
||||
return mat;
|
||||
@@ -82,11 +80,11 @@ namespace Inspectron.Camera.UEye
|
||||
|
||||
uEye.Defines.Status statusRet = 0;
|
||||
|
||||
// Open _camera
|
||||
// Open camera
|
||||
statusRet = _camera.Init(cameraIdx);
|
||||
if (statusRet != uEye.Defines.Status.Success)
|
||||
{
|
||||
throw new Exception("_camera initializing failed: "+statusRet);
|
||||
throw new Exception("Camera initialization failed: "+statusRet);
|
||||
}
|
||||
uEye.Types.SensorInfo info = new uEye.Types.SensorInfo();
|
||||
_camera.Information.GetSensorInfo(out info);
|
||||
@@ -101,7 +99,6 @@ namespace Inspectron.Camera.UEye
|
||||
if (statusRet != uEye.Defines.Status.Success)
|
||||
{
|
||||
throw new Exception("Allocate Memory failed");
|
||||
|
||||
}
|
||||
_camera.EventFrame += onFrameEvent;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user