Class NPPImage_32uC4
Implements
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public class NPPImage_32uC4 : NPPImageBase, IDisposable
Constructors
| Improve this Doc View SourceNPPImage_32uC4(CUdeviceptr, NppiSize, Int32)
Creates a new NPPImage from allocated device ptr.
Declaration
public NPPImage_32uC4(CUdeviceptr devPtr, NppiSize size, int pitch)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devPtr | Already allocated device ptr. |
NppiSize | size | Image size |
System.Int32 | pitch | Pitch / Line step |
NPPImage_32uC4(CUdeviceptr, NppiSize, Int32, Boolean)
Creates a new NPPImage from allocated device ptr.
Declaration
public NPPImage_32uC4(CUdeviceptr devPtr, NppiSize size, int pitch, bool isOwner)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devPtr | Already allocated device ptr. |
NppiSize | size | Image size |
System.Int32 | pitch | Pitch / Line step |
System.Boolean | isOwner | If TRUE, devPtr is freed when disposing |
NPPImage_32uC4(CUdeviceptr, Int32, Int32, Int32)
Creates a new NPPImage from allocated device ptr. Does not take ownership of decPtr.
Declaration
public NPPImage_32uC4(CUdeviceptr devPtr, int width, int height, int pitch)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devPtr | Already allocated device ptr. |
System.Int32 | width | Image width in pixels |
System.Int32 | height | Image height in pixels |
System.Int32 | pitch | Pitch / Line step |
NPPImage_32uC4(CUdeviceptr, Int32, Int32, Int32, Boolean)
Creates a new NPPImage from allocated device ptr.
Declaration
public NPPImage_32uC4(CUdeviceptr devPtr, int width, int height, int pitch, bool isOwner)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devPtr | Already allocated device ptr. |
System.Int32 | width | Image width in pixels |
System.Int32 | height | Image height in pixels |
System.Int32 | pitch | Pitch / Line step |
System.Boolean | isOwner | If TRUE, devPtr is freed when disposing |
NPPImage_32uC4(NPPImageBase)
Creates a new NPPImage from allocated device ptr. Does not take ownership of inner image device pointer.
Declaration
public NPPImage_32uC4(NPPImageBase image)
Parameters
Type | Name | Description |
---|---|---|
NPPImageBase | image | NPP image |
NPPImage_32uC4(NppiSize)
Allocates new memory on device using NPP-Api.
Declaration
public NPPImage_32uC4(NppiSize size)
Parameters
Type | Name | Description |
---|---|---|
NppiSize | size | Image size |
NPPImage_32uC4(Int32, Int32)
Allocates new memory on device using NPP-Api.
Declaration
public NPPImage_32uC4(int nWidthPixels, int nHeightPixels)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nWidthPixels | Image width in pixels |
System.Int32 | nHeightPixels | Image height in pixels |
Methods
| Improve this Doc View SourceADotProdGetBufferHostSize()
Device scratch buffer size (in bytes) for nppiDotProd_32u64f_C4R. Ignoring alpha channel.
Declaration
public int ADotProdGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
ADotProduct(NPPImage_32uC4, CudaDeviceVariable<Double>)
Four-channel 32-bit unsigned image DotProd. Buffer is internally allocated and freed. Ignoring alpha channel.
Declaration
public void ADotProduct(NPPImage_32uC4 src2, CudaDeviceVariable<double> pDp)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pDp | Pointer to the computed dot product of the two images. (3 * sizeof(double)) |
ADotProduct(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
Four-channel 32-bit unsigned image DotProd. Ignoring alpha channel.
Declaration
public void ADotProduct(NPPImage_32uC4 src2, CudaDeviceVariable<double> pDp, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pDp | Pointer to the computed dot product of the two images. (3 * sizeof(double)) |
CudaDeviceVariable<System.Byte> | buffer | Allocated device memory with size of at ADotProdGetBufferHostSize() |
AlphaComp(NPPImage_32uC4, NPPImage_32uC4, NppiAlphaOp)
image composition using image alpha values (0 - max channel pixel value).
Declaration
public void AlphaComp(NPPImage_32uC4 src2, NPPImage_32uC4 dest, NppiAlphaOp nppAlphaOp)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
NPPImage_32uC4 | dest | Destination image |
NppiAlphaOp | nppAlphaOp | alpha compositing operation |
AverageError(NPPImage_32uC4, CudaDeviceVariable<Double>)
image average error. User buffer is internally allocated and freed.
Declaration
public void AverageError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
AverageError(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
image average error.
Declaration
public void AverageError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
CudaDeviceVariable<System.Byte> | buffer | Pointer to the user-allocated scratch buffer required for the AverageError operation. |
AverageErrorGetBufferHostSize()
Device scratch buffer size (in bytes) for AverageError.
Declaration
public int AverageErrorGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
AverageRelativeError(NPPImage_32uC4, CudaDeviceVariable<Double>)
image average relative error. User buffer is internally allocated and freed.
Declaration
public void AverageRelativeError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
AverageRelativeError(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
image average relative error.
Declaration
public void AverageRelativeError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
CudaDeviceVariable<System.Byte> | buffer | Pointer to the user-allocated scratch buffer required for the AverageRelativeError operation. |
AverageRelativeErrorGetBufferHostSize()
Device scratch buffer size (in bytes) for AverageRelativeError.
Declaration
public int AverageRelativeErrorGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
DotProdGetBufferHostSize()
Device scratch buffer size (in bytes) for nppiDotProd_32u64f_C4R.
Declaration
public int DotProdGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
DotProduct(NPPImage_32uC4, CudaDeviceVariable<Double>)
Four-channel 32-bit unsigned image DotProd. Buffer is internally allocated and freed.
Declaration
public void DotProduct(NPPImage_32uC4 src2, CudaDeviceVariable<double> pDp)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pDp | Pointer to the computed dot product of the two images. (4 * sizeof(double)) |
DotProduct(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
Four-channel 32-bit unsigned image DotProd.
Declaration
public void DotProduct(NPPImage_32uC4 src2, CudaDeviceVariable<double> pDp, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pDp | Pointer to the computed dot product of the two images. (4 * sizeof(double)) |
CudaDeviceVariable<System.Byte> | buffer | Allocated device memory with size of at DotProdGetBufferHostSize() |
Finalize()
For dispose
Declaration
protected void Finalize()
MaxError(NPPImage_32uC4, CudaDeviceVariable<Double>)
image maximum error. User buffer is internally allocated and freed.
Declaration
public void MaxError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
MaxError(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
image maximum error.
Declaration
public void MaxError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
CudaDeviceVariable<System.Byte> | buffer | Pointer to the user-allocated scratch buffer required for the MaxError operation. |
MaxErrorGetBufferHostSize()
Device scratch buffer size (in bytes) for MaxError.
Declaration
public int MaxErrorGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
MaximumRelativeError(NPPImage_32uC4, CudaDeviceVariable<Double>)
image maximum relative error. User buffer is internally allocated and freed.
Declaration
public void MaximumRelativeError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
MaximumRelativeError(NPPImage_32uC4, CudaDeviceVariable<Double>, CudaDeviceVariable<Byte>)
image maximum relative error.
Declaration
public void MaximumRelativeError(NPPImage_32uC4 src2, CudaDeviceVariable<double> pError, CudaDeviceVariable<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | src2 | 2nd source image |
CudaDeviceVariable<System.Double> | pError | Pointer to the computed error. |
CudaDeviceVariable<System.Byte> | buffer | Pointer to the user-allocated scratch buffer required for the MaximumRelativeError operation. |
MaximumRelativeErrorGetBufferHostSize()
Device scratch buffer size (in bytes) for MaximumRelativeError.
Declaration
public int MaximumRelativeErrorGetBufferHostSize()
Returns
Type | Description |
---|---|
System.Int32 |
Set(UInt32[])
Set pixel values to nValue.
Declaration
public void Set(uint[] nValue)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32[] | nValue | Value to be set |
SetA(UInt32[])
4 channel 32-bit unsigned image set method, not affecting Alpha channel.
Declaration
public void SetA(uint[] nValue)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32[] | nValue | Value to be set |
ToCudaPitchedDeviceVariable()
Converts a NPPImage to a CudaPitchedDeviceVariable
Declaration
public CudaPitchedDeviceVariable<uint4> ToCudaPitchedDeviceVariable()
Returns
Type | Description |
---|---|
CudaPitchedDeviceVariable<uint4> |
Operators
| Improve this Doc View SourceImplicit(CudaPitchedDeviceVariable<uint4> to NPPImage_32uC4)
Converts a CudaPitchedDeviceVariable to a NPPImage
Declaration
public static implicit operator NPPImage_32uC4(CudaPitchedDeviceVariable<uint4> img)
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<uint4> | img | CudaPitchedDeviceVariable |
Returns
Type | Description |
---|---|
NPPImage_32uC4 | NPPImage with the same device pointer and size of CudaPitchedDeviceVariable with ROI set to full image |
Implicit(NPPImage_32uC4 to CudaPitchedDeviceVariable<uint4>)
Converts a NPPImage to a CudaPitchedDeviceVariable
Declaration
public static implicit operator CudaPitchedDeviceVariable<uint4>(NPPImage_32uC4 img)
Parameters
Type | Name | Description |
---|---|---|
NPPImage_32uC4 | img | NPPImage |
Returns
Type | Description |
---|---|
CudaPitchedDeviceVariable<uint4> | CudaPitchedDeviceVariable with the same device pointer and size of NPPImage without ROI information |