NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.7.1.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Compare Images Operations

Compare the pixels of two images and create a binary result image. More...

Functions

NppStatus nppiCompare_8u_C1R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 1 channel 8-bit unsigned char image compare. More...
 
NppStatus nppiCompare_8u_C1R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_8u_C3R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 3 channel 8-bit unsigned char image compare. More...
 
NppStatus nppiCompare_8u_C3R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_8u_C4R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 8-bit unsigned char image compare. More...
 
NppStatus nppiCompare_8u_C4R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_8u_AC4R_Ctx (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 8-bit unsigned char image compare, not affecting Alpha. More...
 
NppStatus nppiCompare_8u_AC4R (const Npp8u *pSrc1, int nSrc1Step, const Npp8u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16u_C1R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 1 channel 16-bit unsigned short image compare. More...
 
NppStatus nppiCompare_16u_C1R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16u_C3R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 3 channel 16-bit unsigned short image compare. More...
 
NppStatus nppiCompare_16u_C3R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16u_C4R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 16-bit unsigned short image compare. More...
 
NppStatus nppiCompare_16u_C4R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16u_AC4R_Ctx (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 16-bit unsigned short image compare, not affecting Alpha. More...
 
NppStatus nppiCompare_16u_AC4R (const Npp16u *pSrc1, int nSrc1Step, const Npp16u *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16s_C1R_Ctx (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 1 channel 16-bit signed short image compare. More...
 
NppStatus nppiCompare_16s_C1R (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16s_C3R_Ctx (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 3 channel 16-bit signed short image compare. More...
 
NppStatus nppiCompare_16s_C3R (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16s_C4R_Ctx (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 16-bit signed short image compare. More...
 
NppStatus nppiCompare_16s_C4R (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_16s_AC4R_Ctx (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 16-bit signed short image compare, not affecting Alpha. More...
 
NppStatus nppiCompare_16s_AC4R (const Npp16s *pSrc1, int nSrc1Step, const Npp16s *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_32f_C1R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 1 channel 32-bit floating point image compare. More...
 
NppStatus nppiCompare_32f_C1R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_32f_C3R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 3 channel 32-bit floating point image compare. More...
 
NppStatus nppiCompare_32f_C3R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_32f_C4R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 32-bit floating point image compare. More...
 
NppStatus nppiCompare_32f_C4R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 
NppStatus nppiCompare_32f_AC4R_Ctx (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation, NppStreamContext nppStreamCtx)
 4 channel 32-bit signed floating point compare, not affecting Alpha. More...
 
NppStatus nppiCompare_32f_AC4R (const Npp32f *pSrc1, int nSrc1Step, const Npp32f *pSrc2, int nSrc2Step, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppCmpOp eComparisonOperation)
 

Detailed Description

Compare the pixels of two images and create a binary result image.

In case of multi-channel image types, the condition must be fulfilled for all channels, otherwise the comparison is considered false. The "binary" result image is of type 8u_C1. False is represented by 0, true by NPP_MAX_8U.

Common parameters for nppiCompare functions include:

Parameters
pSrc1Source-Image Pointer.
nSrc1StepSource-Image Line Step.
pSrc2Source-Image Pointer.
nSrc2StepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
eComparisonOperationSpecifies the comparison operation to be used in the pixel comparison.
nppStreamCtxApplication Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes

Function Documentation

NppStatus nppiCompare_16s_AC4R ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16s_AC4R_Ctx ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 16-bit signed short image compare, not affecting Alpha.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16s_C1R ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16s_C1R_Ctx ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

1 channel 16-bit signed short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16s_C3R ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16s_C3R_Ctx ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

3 channel 16-bit signed short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16s_C4R ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16s_C4R_Ctx ( const Npp16s pSrc1,
int  nSrc1Step,
const Npp16s pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 16-bit signed short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16u_AC4R ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16u_AC4R_Ctx ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 16-bit unsigned short image compare, not affecting Alpha.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16u_C1R ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16u_C1R_Ctx ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

1 channel 16-bit unsigned short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16u_C3R ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16u_C3R_Ctx ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

3 channel 16-bit unsigned short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_16u_C4R ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_16u_C4R_Ctx ( const Npp16u pSrc1,
int  nSrc1Step,
const Npp16u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 16-bit unsigned short image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_32f_AC4R ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_32f_AC4R_Ctx ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 32-bit signed floating point compare, not affecting Alpha.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_32f_C1R ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_32f_C1R_Ctx ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

1 channel 32-bit floating point image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_32f_C3R ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_32f_C3R_Ctx ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

3 channel 32-bit floating point image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_32f_C4R ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_32f_C4R_Ctx ( const Npp32f pSrc1,
int  nSrc1Step,
const Npp32f pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 32-bit floating point image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_8u_AC4R ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_8u_AC4R_Ctx ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 8-bit unsigned char image compare, not affecting Alpha.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_8u_C1R ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_8u_C1R_Ctx ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

1 channel 8-bit unsigned char image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_8u_C3R ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_8u_C3R_Ctx ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

3 channel 8-bit unsigned char image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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

NppStatus nppiCompare_8u_C4R ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation 
)
NppStatus nppiCompare_8u_C4R_Ctx ( const Npp8u pSrc1,
int  nSrc1Step,
const Npp8u pSrc2,
int  nSrc2Step,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppCmpOp  eComparisonOperation,
NppStreamContext  nppStreamCtx 
)

4 channel 8-bit unsigned char image compare.

Compare pSrc1's pixels with corresponding pixels in pSrc2.

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


Copyright © 2009-2022 NVIDIA CORPORATION AND AFFILIATES