设置网络摄像头属性(例如,增益,亮度,曝光) [英] set webcam properties (e.g. gain, brightness, exposure)

查看:347
本文介绍了设置网络摄像头属性(例如,增益,亮度,曝光)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在C#(Winforms)上编写一个小型应用程序,在其中访问网络摄像头以捕获一些图像。

I'm writing a small application on C# (Winforms) where I am accessing a Webcam to capture some images.

有人知道是否可以访问和使用C#设置网络摄像机的属性,例如增益,亮度和曝光? (不要弹出网络摄像头自己的属性窗口)

Does anyone know if it's possible to access and set the webcam's properties like gain, brightness and exposure using c#? (Don't pop-up Webcam's own Properties window)

我尝试使用DirectShow库,它仅允许我设置曝光,但没有增益或亮度。

I've tried using the DirectShow library and it only allows me to set the exposure but no the gain nor brightness.

预先加油

推荐答案

您可以使用 IAMVideoProcAmp :: Set 方法,可设置的属性包括:

You can set them using IAMVideoProcAmp::Set method, the settable properties include:

typedef enum tagVideoProcAmpProperty {
  VideoProcAmp_Brightness,
  VideoProcAmp_Contrast,
  VideoProcAmp_Hue,
  VideoProcAmp_Saturation,
  VideoProcAmp_Sharpness,
  VideoProcAmp_Gamma,
  VideoProcAmp_ColorEnable,
  VideoProcAmp_WhiteBalance,
  VideoProcAmp_BacklightCompensation,
  VideoProcAmp_Gain 
} VideoProcAmpProperty;

相机驱动程序当然需要支持/实现属性以便对其进行调整。

The camera driver certainly needs to support/implement the properties in order for them to be adjustable.

这篇关于设置网络摄像头属性(例如,增益,亮度,曝光)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆