public Pixelmap GetIntegratedFrame(int startFrameNo, int framesToIntegrate, bool isSlidingIntegration, bool isMedianAveraging) { if (Mode == ReInterlaceMode.None) { return(m_BaseStream.GetIntegratedFrame(startFrameNo, framesToIntegrate, isSlidingIntegration, isMedianAveraging)); } else { throw new NotSupportedException(); } }
public Pixelmap GetFrame(int frameNo, bool noIntegrate) { Pixelmap currentBitmap = null; if (m_VideoStream != null) { if (frameNo >= m_VideoStream.LastFrame) { frameNo = m_VideoStream.LastFrame; } if (frameNo < m_VideoStream.FirstFrame) { frameNo = m_VideoStream.FirstFrame; } try { if (noIntegrate || !m_VideoStream.SupportsSoftwareIntegration) { currentBitmap = m_VideoStream.GetPixelmap(GetDirectionAwareFrameIndex(frameNo)); } else { currentBitmap = m_VideoStream.GetIntegratedFrame(GetDirectionAwareFrameIndex(frameNo), m_FramesToIntegrate, m_FrameIntegration == FrameIntegratingMode.SlidingAverage, m_PixelIntegrationMode == PixelIntegrationType.Median); } } catch (Exception ex) { Trace.WriteLine(ex.ToString()); } } return(currentBitmap); }