| NVIDIA 2D Image And Signal Performance Primitives (NPP)
    Version 11.8..*
    | 
Primitives for computing the norms of an image, the norms of difference, and the relative errors of two images. More...
| Modules | |
| Norm_Inf | |
| Primitives for computing the infinity norm of an image. | |
| Norm_L1 | |
| Primitives for computing the L1 norm of an image. | |
| Norm_L2 | |
| Primitives for computing the L2 norm of an image. | |
| NormDiff_Inf | |
| Primitives for computing the infinity norm of difference of pixels between two images. | |
| NormDiff_L1 | |
| Primitives for computing the L1 norm of difference of pixels between two images. | |
| NormDiff_L2 | |
| Primitives for computing the L2 norm of difference of pixels between two images. | |
| NormRel_Inf | |
| Primitives for computing the relative error of infinity norm between two images. | |
| NormRel_L1 | |
| Primitives for computing the relative error of L1 norm between two images. | |
| NormRel_L2 | |
| Primitives for computing the relative error of L2 norm between two images. | |
Primitives for computing the norms of an image, the norms of difference, and the relative errors of two images.
Given an image  with width
 with width  and height
 and height  ,
,
![\[Norm\_L1 = \sum_{j=0}^{H-1}\sum_{i=0}^{W-1}\left| pSrc(j,i)\right|\]](form_50.png) 
![\[Norm\_L2 = \sqrt{\sum_{j=0}^{H-1}\sum_{i=0}^{W-1}\left| pSrc(j,i)\right| ^2}\]](form_51.png) 
Given two images  and
 and  both with width
 both with width  and height
 and height  ,
,
![\[NormDiff\_L1 = \sum_{j=0}^{H-1}\sum_{i=0}^{W-1}\left| pSrc1(j,i)-pSrc2(j,i)\right|\]](form_54.png) 
![\[NormDiff\_L2 = \sqrt{\sum_{j=0}^{H-1}\sum_{i=0}^{W-1}\left| pSrc1(j,i)-pSrc2(j,i)\right| ^2}\]](form_55.png) 
Given two images  and
 and  both with width
 both with width  and height
 and height  ,
,
![\[NormRel\_Inf = \frac{NormDiff\_Inf}{Norm\_Inf_{src2}}\]](form_56.png) 
![\[NormRel\_L1 = \frac{NormDiff\_L1}{Norm\_L1_{src2}}\]](form_57.png) 
![\[NormRel\_L2 = \frac{NormDiff\_L2}{Norm\_L2_{src2}}\]](form_58.png) 
The norm functions require the addition device scratch buffer for the computations.
| pSrc1 | Source-Image Pointer. | 
| nSrc1Step | Source-Image Line Step. | 
| pSrc2 | Source-Image Pointer. | 
| nSrc2Step | Source-Image Line Step. | 
| oSizeROI | Region-of-Interest (ROI). | 
| pMask | Mask-Image Pointer. | 
| nMaskStep | Mask-Image Line Step. | 
| nCOI | Channel_of_Interest Number. | 
| pNorm | Pointer to the norm value. | 
| pNormDiff | Pointer to the computed norm of differences. | 
| pNormRel | Pointer to the computed relative error for the infinity norm of two images. | 
| pDeviceBuffer | Pointer to the required device memory allocation, Scratch Buffer and Host Pointer. Use nppiNormInfGetBufferHostSize_XX_XXX to compute the required size (in bytes). | 
| nppStreamCtx | Application Managed Stream Context. |