OpenCvSharp.Blob.CvBlobLib.SaveImageBlob C# (CSharp) Method

SaveImageBlob() public static method

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 static SaveImageBlob ( string fileName, Mat img, CvBlob blob ) : void
fileName string Name of the file.
img Mat Image.
blob CvBlob Blob.
return void
        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);
        }