本文整理汇总了C#中ICameraDevice.GetCapability方法的典型用法代码示例。如果您正苦于以下问题:C# ICameraDevice.GetCapability方法的具体用法?C# ICameraDevice.GetCapability怎么用?C# ICameraDevice.GetCapability使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICameraDevice
的用法示例。
在下文中一共展示了ICameraDevice.GetCapability方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeviceManager_CameraSelected
private void DeviceManager_CameraSelected(ICameraDevice oldcameraDevice, ICameraDevice newcameraDevice)
{
if (newcameraDevice == null)
return;
CameraProperty property = ServiceProvider.Settings.CameraProperties.Get(newcameraDevice);
// load session data only if not session attached to the selected camera
if (newcameraDevice.AttachedPhotoSession == null)
{
newcameraDevice.AttachedPhotoSession = ServiceProvider.Settings.GetSession(property.PhotoSessionName);
}
if (newcameraDevice.AttachedPhotoSession != null)
ServiceProvider.Settings.DefaultSession = (PhotoSession)newcameraDevice.AttachedPhotoSession;
if (newcameraDevice.GetCapability(CapabilityEnum.CaptureInRam))
newcameraDevice.CaptureInSdRam = property.CaptureInSdRam;
}
示例2: DeviceManager_CameraSelected
void DeviceManager_CameraSelected(ICameraDevice oldcameraDevice, ICameraDevice newcameraDevice)
{
MethodInvoker method = delegate
{
btn_liveview.Enabled = newcameraDevice.GetCapability(CapabilityEnum.LiveView);
};
if (InvokeRequired)
BeginInvoke(method);
else
method.Invoke();
}
示例3: LiveViewViewModel
public LiveViewViewModel(ICameraDevice device)
{
CameraDevice = device;
CameraProperty = device.LoadProperties();
SimpleManualFocus = CameraDevice.GetCapability(CapabilityEnum.SimpleManualFocus);
Title = TranslationStrings.LiveViewWindowTitle + " - " + CameraProperty.DeviceName;
InitOverlay();
InitCommands();
if (ServiceProvider.Settings.DetectionType == 0)
{
_detector = new MotionDetector(
new TwoFramesDifferenceDetector(true),
new BlobCountingObjectsProcessing(
ServiceProvider.Settings.MotionBlockSize,
ServiceProvider.Settings.MotionBlockSize, true));
}
else
{
_detector = new MotionDetector(
new SimpleBackgroundModelingDetector(true, true),
new BlobCountingObjectsProcessing(
ServiceProvider.Settings.MotionBlockSize,
ServiceProvider.Settings.MotionBlockSize, true));
}
TriggerOnMotion = false;
ShowHistogram = true;
Init();
ServiceProvider.WindowsManager.Event += WindowsManagerEvent;
}
示例4: LiveViewViewModel
public LiveViewViewModel(ICameraDevice device)
{
CameraDevice = device;
CameraProperty = device.LoadProperties();
SimpleManualFocus = CameraDevice.GetCapability(CapabilityEnum.SimpleManualFocus);
InitOverlay();
InitCommands();
if (ServiceProvider.Settings.DetectionType == 0)
{
_detector = new MotionDetector(
new TwoFramesDifferenceDetector(true),
new BlobCountingObjectsProcessing(
ServiceProvider.Settings.MotionBlockSize,
ServiceProvider.Settings.MotionBlockSize, true));
}
else
{
_detector = new MotionDetector(
new SimpleBackgroundModelingDetector(true, true),
new BlobCountingObjectsProcessing(
ServiceProvider.Settings.MotionBlockSize,
ServiceProvider.Settings.MotionBlockSize, true));
}
TriggerOnMotion = false;
Init();
}