IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
MedianFilter.cs
Go to the documentation of this file.
1using System.Runtime.InteropServices;
3
5
31public class MedianFilter
32{
52 public uint KernelSize = 3;
53
83 public Image Process(Image image)
84 {
85 var outputImage = new Image(image.PixelFormat, image.Size);
86
87 DllHelper.ExecuteAndMapReturnCodes(() =>
88 CInterface.peak_icv_Filter_Image_Median(image._handle, KernelSize, outputImage._handle));
89
90 return outputImage;
91 }
92
93 private static class CInterface
94 {
95 [DllImport(Global.LibraryName, CallingConvention = Global.CallingConvention)]
96 public static extern Backend.Types.peak_icv_status peak_icv_Filter_Image_Median(Image.Handle input_image,
97 nuint kernel_size, Image.Handle output_image);
98 }
99}
Class for applying a median filter to an image.
Image Process(Image image)
Applies the median filter to the specified image.
Constructs an Image from an IImageView Instance.
Definition Image.cs:18
PixelFormat PixelFormat
Gets the pixel format from the image.
Definition Image.cs:217
Size Size
Gets the image size in pixels from the image.
Definition Image.cs:223