ColorTwistBatch
Color Processing

Routines for converting between various image color models using user supplied matrix coefficients on batches of images. More...

## Data Structures

struct | NppiColorTwistBatchCXR

## ColorTwistBatch

Perform color twist pixel batch processing.

Color twist consists of applying the following formula to each image pixel using coefficients from one or more user supplied color twist device memory matrix arrays as follows where dst[x] and src[x] represent destination pixel and source pixel channel or plane x. The full sized coefficient matrix should be sent for all pixel channel sizes, the function will process the appropriate coefficients and channels for the corresponding pixel size. ColorTwistBatch generally takes the same parameter list as ColorTwist except that there is a list of N instances of those parameters (N > 1) and that list is passed in device memory; The matrix pointers referenced for each image in the batch also need to point to device memory matrix values. A convenient data structure is provided that allows for easy initialization of the parameter lists. The only restriction on these functions is that there is one single ROI which is applied respectively to each image in the batch. The primary purpose of this function is to provide improved performance for batches of smaller images as long as GPU resources are available. Therefore it is recommended that the function not be used for very large images as there may not be resources available for processing several large images simultaneously.

* dst[0] = aTwist[0][0] * src[0] + aTwist[0][1] * src[1] + aTwist[0][2] * src[2] + aTwist[0][3]
* dst[1] = aTwist[1][0] * src[0] + aTwist[1][1] * src[1] + aTwist[1][2] * src[2] + aTwist[1][3]
* dst[2] = aTwist[2][0] * src[0] + aTwist[2][1] * src[1] + aTwist[2][2] * src[2] + aTwist[2][3]
*

NppStatus | nppiColorTwistBatch_32f_C1R (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 1 channel 32-bit floating point color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_C1IR (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 1 channel 32-bit floating point in place color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_C3R (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 3 channel 32-bit floating point color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_C3IR (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 3 channel 32-bit floating point in place color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_C4R (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel 32-bit floating point color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_C4IR (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel 32-bit floating point in place color twist batch. More...
NppStatus | nppiColorTwistBatch_32f_AC4R (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel 32-bit floating point color twist batch, not affecting Alpha. More...
NppStatus | nppiColorTwistBatch_32f_AC4IR (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel 32-bit floating point in place color twist batch, not affecting Alpha. More...
NppStatus | nppiColorTwistBatch_32fC_C4R (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel 32-bit floating point color twist with 4x5 matrix including a constant vector (20 coefficients total). More...
NppStatus | nppiColorTwistBatch_32fC_C4IR (Npp32f nMin, Npp32f nMax, NppiSize oSizeROI, NppiColorTwistBatchCXR *pBatchList, int nBatchSize)
| 4 channel in place 32-bit floating point color twist with 4x5 matrix including a constant vector (20 coefficients total). More...

## Detailed Description

Routines for converting between various image color models using user supplied matrix coefficients on batches of images.

## Function Documentation

NppStatus nppiColorTwistBatch_32f_AC4IR | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel 32-bit floating point in place color twist batch, not affecting Alpha.

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_AC4R | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel 32-bit floating point color twist batch, not affecting Alpha.

An input color twist matrix with floating-point coefficient values is applied within the ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C1IR | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

1 channel 32-bit floating point in place color twist batch.

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C1R | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

1 channel 32-bit floating point color twist batch.

An input color twist matrix with floating-point coefficient values is applied within the ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C3IR | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

3 channel 32-bit floating point in place color twist batch.

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C3R | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

3 channel 32-bit floating point color twist batch.

An input color twist matrix with floating-point coefficient values is applied within the ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C4IR | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel 32-bit floating point in place color twist batch.

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32f_C4R | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel 32-bit floating point color twist batch.

An input color twist matrix with floating-point coefficient values is applied within the ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32fC_C4IR | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel in place 32-bit floating point color twist with 4x5 matrix including a constant vector (20 coefficients total).

An input 4x5 color twist matrix with floating-point coefficient values including a constant (in the fourth column) vector is applied within ROI. For this particular version of the function the result is generated as shown below.

* dst[0] = aTwist[0][0] * src[0] + aTwist[0][1] * src[1] + aTwist[0][2] * src[2] + aTwist[0][3] * src[3] + aTwist[0][4]
* dst[1] = aTwist[1][0] * src[0] + aTwist[1][1] * src[1] + aTwist[1][2] * src[2] + aTwist[1][3] * src[3] + aTwist[1][4]
* dst[2] = aTwist[2][0] * src[0] + aTwist[2][1] * src[1] + aTwist[2][2] * src[2] + aTwist[2][3] * src[3] + aTwist[2][4]
* dst[3] = aTwist[3][0] * src[0] + aTwist[3][1] * src[1] + aTwist[3][2] * src[2] + aTwist[3][3] * src[3] + aTwist[3][4]
*

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiColorTwistBatch_32fC_C4R | ( | Npp32f | nMin,
|  | Npp32f | nMax,
|  | NppiSize | oSizeROI,
|  | NppiColorTwistBatchCXR * | pBatchList,
|  | int | nBatchSize
| ) |  |

4 channel 32-bit floating point color twist with 4x5 matrix including a constant vector (20 coefficients total).

An input 4x5 color twist matrix with floating-point coefficient values including a constant (in the fourth column) vector is applied within ROI. For this particular version of the function the result is generated as shown below.

* dst[0] = aTwist[0][0] * src[0] + aTwist[0][1] * src[1] + aTwist[0][2] * src[2] + aTwist[0][3] * src[3] + aTwist[0][4]
* dst[1] = aTwist[1][0] * src[0] + aTwist[1][1] * src[1] + aTwist[1][2] * src[2] + aTwist[1][3] * src[3] + aTwist[1][4]
* dst[2] = aTwist[2][0] * src[0] + aTwist[2][1] * src[1] + aTwist[2][2] * src[2] + aTwist[2][3] * src[3] + aTwist[2][4]
* dst[3] = aTwist[3][0] * src[0] + aTwist[3][1] * src[1] + aTwist[3][2] * src[2] + aTwist[3][3] * src[3] + aTwist[3][4]
*

An input color twist matrix with floating-point coefficient values is applied within ROI for each image in batch. Color twist matrix can vary per image. The same ROI is applied to each image.

Parameters

  nMin | Minimum clamp value.
  nMax | Maximum saturation and clamp value.
  oSizeROI | Region-of-Interest (ROI).
  pBatchList | Device memory pointer to nBatchSize list of NppiColorTwistBatchCXR structures.
  nBatchSize | Number of NppiColorTwistBatchCXR structures in this call (must be > 1).

Returns
  Image Data Related Error Codes, ROI Related Error Codes

Copyright © 2009-2017 NVIDIA Corporation