Ejemplo n.º 1
0
 /// <summary>
 /// Save this image to the specific file.
 /// </summary>
 /// <param name="fileName">The name of the file to be saved to</param>
 /// <remarks>The image format is chosen depending on the filename extension, see cvLoadImage. Only 8-bit single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function. If the format, depth or channel order is different, use cvCvtScale and cvCvtColor to convert it before saving, or use universal cvSave to save the image to XML or YAML format.</remarks>
 public void Save(string fileName)
 {
     using (Mat tmp = GetMat(CvEnum.AccessType.Read))
     {
         tmp.Save(fileName);
     }
 }
Ejemplo n.º 2
0
Archivo: Camera.cs Proyecto: kjwitt/AVA
        public void TakePic()
        {
            //Console.WriteLine(FrameRate);

            Mat frame = new Mat();
            //frame = capture.QueryFrame();

            capture.Grab();
            capture.Retrieve(frame, 0);

            frame.Save("/home/pi/AVA/Photos/" + string.Format("{0:yyyy-MM-dd hh_mm_ss_fftt}", DateTime.Now) + ".jpg");

            Debug.DebugStatement("Photo taken", ConsoleColor.White);
            //Thread.Sleep((int)(1000.0 / FrameRate));
            frame.Dispose();
            //capture.Dispose();
        }