void InitialiseBack() { lock (FBackLock) { FBackBuffer.Initialise(FImageAttributes); } }
public static void CopyImageConverted(CVImage source, CVImage target) { if (target.Size != source.Size) { target.Initialise(source.Size, target.NativeFormat); } COLOR_CONVERSION route = ConvertRoute(source.NativeFormat, target.NativeFormat); if (route == COLOR_CONVERSION.CV_COLORCVT_MAX) { CvInvoke.cvConvert(source.CvMat, target.CvMat); } else { try { CvInvoke.cvCvtColor(source.CvMat, target.CvMat, route); } catch { //CV likes to throw here sometimes, but the next frame it's fine } } }
/// <summary> /// Copy CVImage into target CVImage /// </summary> /// <param name="target"></param> public void GetImage(CVImage target) { if (target.NativeFormat == TColorFormat.UnInitialised) { target.Initialise(this.ImageAttributes); } GetImage(target.ImageAttributes.ColorFormat, target); }