Image Quality Index
Statistical Operations

Primitives for computing the image quality index of two images. More...

## QualityIndex

Given two images and (both ), the mathematical formula to calculate the image quality index between them is expressed as:

where

The functions require additional scratch buffer for computations.

### Common parameters for nppiQualityIndex functions include:

Parameters

  pSrc1 | Source-Image Pointer.
  nSrc1Step | Source-Image Line Step.
  pSrc2 | Source-Image Pointer.
  nSrc2Step | Source-Image Line Step.
  oRoiSize | Region-of-Interest (ROI).
  pDst | Pointer to the quality index.
  pDeviceBuffer | Pointer to the required device memory allocation, Scratch Buffer and Host Pointer.
  nppStreamCtx | Application Managed Stream Context.

Returns
  Image Data Related Error Codes, ROI Related Error Codes, or NPP_QUALITY_INDEX_ERROR if pixels of either image are constant numberse.

NppStatus | nppiQualityIndex_8u32f_C1R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| One-channel 8-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_8u32f_C1R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_16u32f_C1R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| One-channel 16-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_16u32f_C1R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_32f_C1R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| One-channel 32-bit floating point image QualityIndex. More...
NppStatus | nppiQualityIndex_32f_C1R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_8u32f_C3R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Three-channel 8-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_8u32f_C3R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_16u32f_C3R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Three-channel 16-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_16u32f_C3R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_32f_C3R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Three-channel 32-bit floating point image QualityIndex. More...
NppStatus | nppiQualityIndex_32f_C3R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_8u32f_AC4R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Four-channel 8-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_8u32f_AC4R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_16u32f_AC4R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Four-channel 16-bit unsigned image QualityIndex. More...
NppStatus | nppiQualityIndex_16u32f_AC4R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)
NppStatus | nppiQualityIndex_32f_AC4R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
| Four-channel 32-bit floating point image QualityIndex. More...
NppStatus | nppiQualityIndex_32f_AC4R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, NppiSize oRoiSize, Npp32f *pDst, Npp8u *pDeviceBuffer)

## QualityIndexGetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the QualityIndex primitives.
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_C1R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_8u32f_C1R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_C1R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_C1R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_16u32f_C1R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_C1R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_32f_C1R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_32f_C1R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_32f_C1R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_C3R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_8u32f_C3R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_C3R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_C3R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_16u32f_C3R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_C3R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_32f_C3R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_32f_C3R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_32f_C3R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_AC4R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_8u32f_AC4R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_8u32f_AC4R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_AC4R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_16u32f_AC4R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_16u32f_AC4R (NppiSize oSizeROI, int *hpBufferSize)
NppStatus | nppiQualityIndexGetBufferHostSize_32f_AC4R_Ctx (NppiSize oSizeROI, int *hpBufferSize, NppStreamContext nppStreamCtx)
| Buffer size (in bytes) for nppiQualityIndex_32f_AC4R. More...
NppStatus | nppiQualityIndexGetBufferHostSize_32f_AC4R (NppiSize oSizeROI, int *hpBufferSize)

## Detailed Description

Primitives for computing the image quality index of two images.

## Function Documentation

NppStatus nppiQualityIndex_16u32f_AC4R | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_16u32f_AC4R_Ctx | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Four-channel 16-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_16u32f_C1R | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_16u32f_C1R_Ctx | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

One-channel 16-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_16u32f_C3R | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_16u32f_C3R_Ctx | ( | const Npp16u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp16u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Three-channel 16-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_32f_AC4R | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_32f_AC4R_Ctx | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Four-channel 32-bit floating point image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_32f_C1R | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_32f_C1R_Ctx | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

One-channel 32-bit floating point image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_32f_C3R | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_32f_C3R_Ctx | ( | const Npp32f * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp32f * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Three-channel 32-bit floating point image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_8u32f_AC4R | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_8u32f_AC4R_Ctx | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Four-channel 8-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_8u32f_C1R | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_8u32f_C1R_Ctx | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

One-channel 8-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndex_8u32f_C3R | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer
| ) |  |

NppStatus nppiQualityIndex_8u32f_C3R_Ctx | ( | const Npp8u * | pSrc1,
|  | int | nSrc1Step,
|  | const Npp8u * | pSrc2,
|  | int | nSrc2Step,
|  | NppiSize | oRoiSize,
|  | Npp32f * | pDst,
|  | Npp8u * | pDeviceBuffer,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Three-channel 8-bit unsigned image QualityIndex.

For common parameter descriptions, see Common parameters for nppiQualityIndex functions.

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_AC4R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_AC4R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_16u32f_AC4R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_C1R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_C1R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_16u32f_C1R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_C3R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_16u32f_C3R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_16u32f_C3R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_32f_AC4R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_32f_AC4R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_32f_AC4R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_32f_C1R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_32f_C1R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_32f_C1R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_32f_C3R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_32f_C3R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_32f_C3R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_AC4R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_AC4R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_8u32f_AC4R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_C1R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_C1R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_8u32f_C1R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_C3R | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize
| ) |  |

NppStatus nppiQualityIndexGetBufferHostSize_8u32f_C3R_Ctx | ( | NppiSize | oSizeROI,
|  | int * | hpBufferSize,
|  | NppStreamContext | nppStreamCtx
| ) |  |

Buffer size (in bytes) for nppiQualityIndex_8u32f_C3R.

For common parameter descriptions, see CommonGetBufferHostSizeParameters.

Copyright © 2009-2018 NVIDIA Corporation