static void CannyCamera() { using (CvWindow win = new CvWindow("Canny")) using (CvCapture cap = new CvCapture(0)) { using (IplImage frame = cap.QueryFrame()) using (IplImage dst = new IplImage(frame.Size, BitDepth.U8, 1)) { frame.CvtColor(dst, ColorConversion.BgrToGray); dst.Canny(dst, 50.0, 50.0, ApertureSize.Size3); win.Image = dst; } CvWindow.WaitKey(); } }