/// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TColor">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TColor}"/>.</returns>
 public static Image <TColor> DetectEdges <TColor>(this Image <TColor> source, Rectangle rectangle, IEdgeDetectorProcessor <TColor> filter)
     where TColor : struct, IPixel <TColor>
 {
     source.ApplyProcessor(filter, rectangle);
     return(source);
 }
Example #2
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TColor">The pixel format.</typeparam>
 /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
 public static Image <TColor, TPacked> DetectEdges <TColor, TPacked>(this Image <TColor, TPacked> source, Rectangle rectangle, IEdgeDetectorProcessor <TColor, TPacked> filter)
     where TColor : struct, IPackedPixel <TPacked>
     where TPacked : struct
 {
     return(source.Process(rectangle, filter));
 }
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TColor">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TColor}"/>.</returns>
 public static Image <TColor> DetectEdges <TColor>(this Image <TColor> source, IEdgeDetectorProcessor <TColor> filter)
     where TColor : struct, IPixel <TColor>
 {
     return(DetectEdges(source, source.Bounds, filter));
 }
Example #4
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TPixel">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static Image<TPixel> DetectEdges<TPixel>(this Image<TPixel> source, Rectangle rectangle, IEdgeDetectorProcessor<TPixel> filter)
     where TPixel : struct, IPixel<TPixel>
 {
     source.ApplyProcessor(filter, rectangle);
     return source;
 }
Example #5
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TPixel">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static Image<TPixel> DetectEdges<TPixel>(this Image<TPixel> source, IEdgeDetectorProcessor<TPixel> filter)
     where TPixel : struct, IPixel<TPixel>
 {
     return DetectEdges(source, source.Bounds, filter);
 }
Example #6
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TPixel">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static IImageProcessingContext <TPixel> DetectEdges <TPixel>(this IImageProcessingContext <TPixel> source, IEdgeDetectorProcessor <TPixel> filter)
     where TPixel : struct, IPixel <TPixel>
 {
     return(source.ApplyProcessor(filter));
 }
Example #7
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TColor">The pixel format.</typeparam>
 /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
 public static Image <TColor, TPacked> DetectEdges <TColor, TPacked>(this Image <TColor, TPacked> source, IEdgeDetectorProcessor <TColor, TPacked> filter)
     where TColor : struct, IPackedPixel <TPacked>
     where TPacked : struct, IEquatable <TPacked>
 {
     return(DetectEdges(source, source.Bounds, filter));
 }
Example #8
0
 /// <summary>
 /// Detects any edges within the image.
 /// </summary>
 /// <typeparam name="TColor">The pixel format.</typeparam>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <param name="filter">The filter for detecting edges.</param>
 /// <returns>The <see cref="Image{TColor}"/>.</returns>
 public static Image <TColor> DetectEdges <TColor>(this Image <TColor> source, Rectangle rectangle, IEdgeDetectorProcessor <TColor> filter)
     where TColor : struct, IPackedPixel, IEquatable <TColor>
 {
     return(source.Apply(rectangle, filter));
 }