采用DirectShowLib-2005的DXsnap 例子拍摄出来的图像效果问题(高分)
最近在使用DirectShowLib-2005.dll开发摄像头的拍像程序,但我发现拍出的效果没有AMCAP的效果好。
请高手指导。
代码截取:
hr = m_FilterGraph.AddSourceFilterForMoniker(dev.Mon, null, dev.Name, out capFilter);
DsError.ThrowExceptionForHR( hr );
m_pinStill = DsFindPin.ByCategory(capFilter, PinCategory.Still, 0);
// Get a control pointer (used in Click())
m_VidControl = capFilter as IAMVideoControl;
pCaptureOut = DsFindPin.ByCategory(capFilter, PinCategory.Capture, 0);
// If any of the default config items are set
if (iHeight + iWidth + iBPP > 0)
{
SetConfigParms(m_pinStill, iWidth, iHeight, iBPP);
}
采用PinCategory.Still模式时,拍出来的图像有时黑,有时白