public static ArtemisPropertiesStruct GetCameraProperties(int cameraId) { var handle = Connect(cameraId); ArtemisPropertiesStruct outstruct = GetCameraProperties(handle); Disconnect(handle); return(outstruct); }
public static ArtemisPropertiesStruct GetCameraProperties(IntPtr camera) { SensorType type = GetColorInformation(camera); ArtemisPropertiesStruct outstruct = new ArtemisPropertiesStruct(); CheckError(ArtemisProperties(camera, ref outstruct), MethodBase.GetCurrentMethod(), camera); if (type == SensorType.RGGB) { // Debayering doesn't seem to handle uneven rows or columns if ((outstruct.nPixelsX % 1) == 0) { outstruct.nPixelsX = outstruct.nPixelsX - 1; } if ((outstruct.nPixelsY % 1) == 0) { outstruct.nPixelsY = outstruct.nPixelsY - 1; } } return(outstruct); }
private static extern ArtemisErrorCode ArtemisProperties(IntPtr camera, ref ArtemisPropertiesStruct prop);