private LumeneraCamera(int handle, dll.LucamSnapshot snapshot, ushort[] data, int width) { _handle = handle; _snapshot = snapshot; _data = data; _width = width; ResetSettings(); }
public static LumeneraCamera Create(int id) { var camera = dll.LucamCameraOpen(id); if (camera == 0) { return(null); } api.SetFrameRate(camera, api.GetFrameRates(camera).Min()); var snapshot = new dll.LucamSnapshot { BufferLastFrame = false, Exposure = 1000, ExposureDelay = 0, Format = { BinningX = 1, BinningY = 1, FlagsX = 0, FlagsY = 0, Width = (int)GetProperty(camera, dll.LucamProperty.MAX_WIDTH), Height = (int)GetProperty(camera, dll.LucamProperty.MAX_HEIGHT), PixelFormat = dll.LucamPixelFormat.PF_16, SubSampleX = 1, SubSampleY = 1 }, Gain = 4, ShutterType = dll.LucamShutterType.GlobalShutter, StrobeDelay = 0.1f, StrobeFlags = 0, UseHwTrigger = false, Timeout = -1, GainBlue = 1, GainCyan = 1, GainMagenta = 1, GainGrn1 = 1, GainGrn2 = 1, GainRed = 1, GainYel1 = 1, GainYel2 = 1 }; return(new LumeneraCamera(camera, snapshot, new ushort[snapshot.Format.Width * snapshot.Format.Height], snapshot.Format.Width)); }
public static LumeneraCamera Create(int id) { var camera = dll.LucamCameraOpen(id); if (camera == 0) return null; api.SetFrameRate(camera, api.GetFrameRates(camera).Min()); var snapshot = new dll.LucamSnapshot { BufferLastFrame = false, Exposure = 1000, ExposureDelay = 0, Format = { BinningX = 1, BinningY = 1, FlagsX = 0, FlagsY = 0, Width = (int)GetProperty(camera, dll.LucamProperty.MAX_WIDTH), Height = (int)GetProperty(camera, dll.LucamProperty.MAX_HEIGHT), PixelFormat = dll.LucamPixelFormat.PF_16, SubSampleX = 1, SubSampleY = 1 }, Gain = 4, ShutterType = dll.LucamShutterType.GlobalShutter, StrobeDelay = 0.1f, StrobeFlags = 0, UseHwTrigger = false, Timeout = -1, GainBlue = 1, GainCyan = 1, GainMagenta = 1, GainGrn1 = 1, GainGrn2 = 1, GainRed = 1, GainYel1 = 1, GainYel2 = 1 }; return new LumeneraCamera(camera, snapshot, new ushort[snapshot.Format.Width * snapshot.Format.Height], snapshot.Format.Width); }
private LumeneraCamera(int handle, dll.LucamSnapshot snapshot, ushort[] data, int width) { _handle = handle; _snapshot = snapshot; _data = data; _width = width; ResetSettings(); }