使用双摄像头在平板电脑上捕获图像
我已经构建了一个应用程序,可以将从平板电脑摄像头拍摄的图像捕获并上传到数据库,该应用程序适用于只有一个网络摄像头但拒绝从具有双网络摄像头的平板电脑上加载驱动程序的平板电脑。 我使用的代码直接来自另一个代码项目解决方案,我使用这里的代码
有谁知道是否有平板电脑运行双摄像头的问题?
public void Start(ulong FrameNum)
{
try
{
// for safety, call stop, just in case we are already running
this.Stop();
// setup a capture window
mCapHwnd = capCreateCaptureWindowA("WebCap", 0, 0, 0, m_Width, m_Height, this.Handle.ToInt32(), 0);
// connect to the capture device
Application.DoEvents();
SendMessage(mCapHwnd, WM_CAP_CONNECT, 0, 0);
SendMessage(mCapHwnd, WM_CAP_SET_PREVIEW, 0, 0);
// set the frame number
m_FrameNumber = FrameNum;
// set the timer information
this.timer1.Interval = m_TimeToCapture_milliseconds;
bStopped = false;
this.timer1.Start();
}
catch (Exception excep)
{
MessageBox.Show("An error ocurred while starting the video capture. Check that your webcamera is connected properly and turned on.rnn" + excep.Message);
this.Stop();
}
}
链接地址: http://www.djcxy.com/p/14235.html