ManagedCuda.NPP.NPPImage_8uC3.FilterMedian C# (CSharp) Method

FilterMedian() public method

Result pixel value is the median of pixel values under the rectangular mask region.
public FilterMedian ( NPPImage_8uC3 dst, NppiSize oMaskSize, NppiPoint oAnchor, CudaDeviceVariable buffer ) : void
dst NPPImage_8uC3 Destination-Image
oMaskSize NppiSize Width and Height of the neighborhood region for the local Median operation.
oAnchor NppiPoint X and Y offsets of the kernel origin frame of reference relative to the source pixel.
buffer CudaDeviceVariable Pointer to the user-allocated scratch buffer required for the Median operation.
return void
        public void FilterMedian(NPPImage_8uC3 dst, NppiSize oMaskSize, NppiPoint oAnchor, CudaDeviceVariable<byte> buffer)
        {
            int bufferSize = FilterMedianGetBufferHostSize(oMaskSize);
            if (bufferSize > buffer.Size) throw new NPPException("Provided buffer is too small.");

            status = NPPNativeMethods.NPPi.ImageMedianFilter.nppiFilterMedian_8u_C3R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, oMaskSize, oAnchor, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiFilterMedian_8u_C3R", status));
            NPPException.CheckNppStatus(status, this);
        }

Same methods

NPPImage_8uC3::FilterMedian ( NPPImage_8uC3 dst, NppiSize oMaskSize, NppiPoint oAnchor ) : void
NPPImage_8uC3