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

HistogramEven() public method

Histogram with evenly distributed bins. Buffer is internally allocated and freed.
public HistogramEven ( CudaDeviceVariable histogram, int nLowerLevel, int nUpperLevel ) : void
histogram CudaDeviceVariable Allocated device memory of size nLevels (3 Variables)
nLowerLevel int Lower boundary of lowest level bin. E.g. 0 for [0..255]. Size = 3
nUpperLevel int Upper boundary of highest level bin. E.g. 256 for [0..255]. Size = 3
return void
        public void HistogramEven(CudaDeviceVariable<int>[] histogram, int[] nLowerLevel, int[] nUpperLevel)
        {
            int[] size = new int[] { (int)histogram[0].Size + 1, (int)histogram[1].Size + 1, (int)histogram[2].Size + 1 };
            CUdeviceptr[] devPtrs = new CUdeviceptr[] { histogram[0].DevicePointer, histogram[1].DevicePointer, histogram[2].DevicePointer };

            int bufferSize = HistogramEvenGetBufferSize(size);
            CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);

            status = NPPNativeMethods.NPPi.Histogram.nppiHistogramEven_8u_C3R(_devPtrRoi, _pitch, _sizeRoi, devPtrs, size, nLowerLevel, nUpperLevel, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiHistogramEven_8u_C3R", status));
            buffer.Dispose();
            NPPException.CheckNppStatus(status, this);
        }

Same methods

NPPImage_8uC3::HistogramEven ( CudaDeviceVariable histogram, int nLowerLevel, int nUpperLevel, CudaDeviceVariable buffer ) : void
NPPImage_8uC3