SaveImage() 공개 메소드

Save the image of a blob to a file. The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure. Then the function saves a copy of the part of the image where the blob is.
public SaveImage ( string fileName, Mat img ) : void
fileName string Name of the file.
img Mat Image.
리턴 void
예제 #1
0
 /// <summary>
 /// Save the image of a blob to a file.
 /// The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure.
 /// Then the function saves a copy of the part of the image where the blob is.
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="img">Image.</param>
 /// <param name="blob">Blob.</param>
 public static void SaveImageBlob(string fileName, IplImage img, CvBlob blob)
 {
     if (String.IsNullOrEmpty(fileName))
     {
         throw new ArgumentNullException("fileName");
     }
     if (blob == null)
     {
         throw new ArgumentNullException("blob");
     }
     blob.SaveImage(fileName, img);
 }
예제 #2
0
 /// <summary>
 /// Save the image of a blob to a file.
 /// The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure.
 /// Then the function saves a copy of the part of the image where the blob is.
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="img">Image.</param>
 /// <param name="blob">Blob.</param>
 public static void SaveImageBlob(string fileName, Mat img, CvBlob blob)
 {
     if (string.IsNullOrEmpty(fileName))
     {
         throw new ArgumentNullException(nameof(fileName));
     }
     if (blob == null)
     {
         throw new ArgumentNullException(nameof(blob));
     }
     blob.SaveImage(fileName, img);
 }
예제 #3
0
 /// <summary>
 /// Save the image of a blob to a file.
 /// The function uses an image (that can be the original pre-processed image or a processed one, or even the result of cvRenderBlobs, for example) and a blob structure.
 /// Then the function saves a copy of the part of the image where the blob is.
 /// </summary>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="img">Image.</param>
 /// <param name="blob">Blob.</param>
 public static void SaveImageBlob(string fileName, Mat img, CvBlob blob)
 {
     if (String.IsNullOrEmpty(fileName))
         throw new ArgumentNullException(nameof(fileName));
     if (blob == null)
         throw new ArgumentNullException(nameof(blob));
     blob.SaveImage(fileName, img);
 }