/// <summary> /// Draws or prints information about blobs. (cvRenderBlobs) /// </summary> /// <param name="blobs">List of blobs.</param> /// <param name="imgSource">Input image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="imgDest">Output image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="mode">Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE.</param> /// <param name="alpha">If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default).</param> public static void RenderBlobs(CvBlobs blobs, IplImage imgSource, IplImage imgDest, RenderBlobsMode mode, double alpha) { if (blobs == null) { throw new ArgumentNullException("blobs"); } if (imgSource == null) { throw new ArgumentNullException("imgSource"); } if (imgDest == null) { throw new ArgumentNullException("imgDest"); } BlobRenderer.PerformMany(blobs, imgSource, imgDest, mode, alpha); }
/// <summary> /// Draws or prints information about blobs. (cvRenderBlobs) /// </summary> /// <param name="blobs">List of blobs.</param> /// <param name="imgSource">Input image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="imgDest">Output image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="mode">Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE.</param> /// <param name="alpha">If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default).</param> public static void RenderBlobs(CvBlobs blobs, Mat imgSource, Mat imgDest, RenderBlobsModes mode, double alpha = 1.0) { if (blobs == null) { throw new ArgumentNullException(nameof(blobs)); } if (imgSource == null) { throw new ArgumentNullException(nameof(imgSource)); } if (imgDest == null) { throw new ArgumentNullException(nameof(imgDest)); } BlobRenderer.PerformMany(blobs, imgSource, imgDest, mode, alpha); }
/// <summary> /// Draws or prints information about a blob. /// </summary> /// <param name="labels">Label data.</param> /// <param name="blob">Blob.</param> /// <param name="imgSource">Input image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="imgDest">Output image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="mode">Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE.</param> /// <param name="color">Color to render (if CV_BLOB_RENDER_COLOR is used).</param> /// <param name="alpha">If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default).</param> public static void RenderBlob(LabelData labels, CvBlob blob, IplImage imgSource, IplImage imgDest, RenderBlobsMode mode, CvScalar color, double alpha) { if (labels == null) { throw new ArgumentNullException("labels"); } if (blob == null) { throw new ArgumentNullException("blob"); } if (imgSource == null) { throw new ArgumentNullException("imgSource"); } if (imgDest == null) { throw new ArgumentNullException("imgDest"); } BlobRenderer.PerformOne(labels, blob, imgSource, imgDest, mode, color, alpha); }
/// <summary> /// Draws or prints information about a blob. /// </summary> /// <param name="labels">Label data.</param> /// <param name="blob">Blob.</param> /// <param name="imgSource">Input image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="imgDest">Output image (depth=IPL_DEPTH_8U and num. channels=3).</param> /// <param name="mode">Render mode. By default is CV_BLOB_RENDER_COLOR|CV_BLOB_RENDER_CENTROID|CV_BLOB_RENDER_BOUNDING_BOX|CV_BLOB_RENDER_ANGLE.</param> /// <param name="color">Color to render (if CV_BLOB_RENDER_COLOR is used).</param> /// <param name="alpha">If mode CV_BLOB_RENDER_COLOR is used. 1.0 indicates opaque and 0.0 translucent (1.0 by default).</param> public static void RenderBlob(LabelData labels, CvBlob blob, Mat imgSource, Mat imgDest, RenderBlobsMode mode, Scalar color, double alpha = 1.0) { if (labels == null) { throw new ArgumentNullException(nameof(labels)); } if (blob == null) { throw new ArgumentNullException(nameof(blob)); } if (imgSource == null) { throw new ArgumentNullException(nameof(imgSource)); } if (imgDest == null) { throw new ArgumentNullException(nameof(imgDest)); } BlobRenderer.PerformOne(labels, blob, imgSource, imgDest, mode, color, alpha); }