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

Mean() public method

image mean with 64-bit double precision result. No additional buffer is allocated.
public Mean ( int coi, CudaDeviceVariable mean, NPPImage_8uC1 mask, CudaDeviceVariable buffer ) : void
coi int Channel of interest (0, 1 or 2)
mean CudaDeviceVariable Allocated device memory with size of at least 3 * sizeof(double)
mask NPPImage_8uC1 If the mask is filled with zeros, then all the returned values are zeros, i.e., pMinIndex = {0, 0}, pMaxIndex = {0, 0}, pMinValue = 0, pMaxValue = 0.
buffer CudaDeviceVariable Allocated device memory with size of at
return void
        public void Mean(int coi, CudaDeviceVariable<double> mean, NPPImage_8uC1 mask, CudaDeviceVariable<byte> buffer)
        {
            int bufferSize = MeanMaskedGetBufferHostSize();
            if (bufferSize > buffer.Size) throw new NPPException("Provided buffer is too small.");

            status = NPPNativeMethods.NPPi.MeanNew.nppiMean_8u_C3CMR(_devPtrRoi, _pitch, mask.DevicePointerRoi, mask.Pitch, _sizeRoi, coi, buffer.DevicePointer, mean.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMean_8u_C3CMR", status));
            NPPException.CheckNppStatus(status, this);
        }

Same methods

NPPImage_8uC3::Mean ( CudaDeviceVariable mean ) : void
NPPImage_8uC3::Mean ( CudaDeviceVariable mean, CudaDeviceVariable buffer ) : void
NPPImage_8uC3::Mean ( int coi, CudaDeviceVariable mean, NPPImage_8uC1 mask ) : void
NPPImage_8uC3