Skip to main content

muPP API 参考

目录


Adjust Brightness

Adjust brightness of an image.

Functions

Function muppiAdjustBrightness_32f_C1R

![][public]

MUppStatus muppiAdjustBrightness_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f brightness_factor)

1 channel 32-bit float GRAY adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • brightness_factor: How much to adjust the brightness. Can be any non negative number. 0 gives a black image, 1 gives the original image while 2 increases the brightness by a factor of 2.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiAdjustBrightness_32f_C3R

![][public]

MUppStatus muppiAdjustBrightness_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f brightness_factor)

3 channel 32-bit float RGB adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • brightness_factor: How much to adjust the brightness. Can be any non negative number. 0 gives a black image, 1 gives the original image while 2 increases the brightness by a factor of 2.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Adjust Hue

Adjust hue of an image. The image hue is adjusted by converting the image to HSV and cyclically shifting the intensities in the hue channel (H). The image is then converted back to original image mode. hue_factor is the amount of shift in H channel and must be in the interval [-0.5, 0.5].

Functions

Function muppiAdjustHue_32f_C1R

![][public]

MUppStatus muppiAdjustHue_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f hue_factor)

1 channel 32-bit float GRAY adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • hue_factor: How much to shift the hue channel. Should be in [-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in HSV space in positive and negative direction respectively. 0 means no shift. Therefore, both -0.5 and 0.5 will give an image with complementary colors while 0 gives the original image.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiAdjustHue_32f_C3R

![][public]

MUppStatus muppiAdjustHue_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f hue_factor)

3 channel 32-bit float RGB adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • hue_factor: How much to shift the hue channel. Should be in [-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in HSV space in positive and negative direction respectively. 0 means no shift. Therefore, both -0.5 and 0.5 will give an image with complementary colors while 0 gives the original image.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Adjust Saturation

Adjust color saturation of an image.

Functions

Function muppiAdjustSaturation_32f_C1R

![][public]

MUppStatus muppiAdjustSaturation_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f saturation_factor)

1 channel 32-bit float GRAY adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • saturation_factor: How much to adjust the saturation. 0 will give a black and white image, 1 will give the original image while 2 will enhance the saturation by a factor of 2.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiAdjustSaturation_32f_C3R

![][public]

MUppStatus muppiAdjustSaturation_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f saturation_factor)

3 channel 32-bit float RGB adjust.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • saturation_factor:

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Affine Transform

Transforms (warps) an image based on an affine transform.

The affine transform is given as a formula {"type":"element","name":"formula","attributes":{"id":"24"},"children":[{"type":"text","text":"$2\\times 3$"}]} matrix C. A pixel location formula {"type":"element","name":"formula","attributes":{"id":"25"},"children":[{"type":"text","text":"$(x, y)$"}]} in the source image is mapped to the location formula {"type":"element","name":"formula","attributes":{"id":"26"},"children":[{"type":"text","text":"$(x', y')$"}]} in the destination image. The destination image coorodinates are computed as follows: formula {"type":"element","name":"formula","attributes":{"id":"27"},"children":[{"type":"text","text":"\\[\n x' = c_{00} * x + c_{01} * y + c_{02} \\qquad\n y' = c_{10} * x + c_{11} * y + c_{12} \\qquad\n C = \\left[ \\matrix{c_{00} & c_{01} & c_{02} \\cr\n c_{10} & c_{11} & c_{12} } \\right]\n \\]"}]} Affine transforms can be understood as a linear transformation (traditional matrix multiplication) and a shift operation. The formula {"type":"element","name":"formula","attributes":{"id":"28"},"children":[{"type":"text","text":"$2\\times 2$"}]} matrix formula {"type":"element","name":"formula","attributes":{"id":"29"},"children":[{"type":"text","text":"\\[\n L = \\left[ \\matrix{c_{00} & c_{01} \\cr\n c_{10} & c_{11} } \\right]\n \\]"}]} represents the linear transform portion of the affine transformation. The vector formula {"type":"element","name":"formula","attributes":{"id":"30"},"children":[{"type":"text","text":"\\[\n v = \\left( \\matrix{c_{02} \\cr\n c_{12} } \\right)\n \\]"}]} represents the post-transform shift, i.e. after the pixel location is transformed by formula {"type":"element","name":"formula","attributes":{"id":"31"},"children":[{"type":"text","text":"$L$"}]} it is translated by formula {"type":"element","name":"formula","attributes":{"id":"32"},"children":[{"type":"text","text":"$v$"}]}.

Common parameters for muppiWarpAffine packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Affine transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes

Common parameters for muppiWarpAffine planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_planar_image_pointer_array. (host memory array containing device memory image plane pointers)
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Affine transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes

Functions

Function muppiWarpAffine_32f_C1R

![][public]

MUppStatus muppiWarpAffine_32f_C1R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, const double aCoeffs[2][3], int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const double aCoeffs
  • int eInterpolation

Return type: MUppStatus

Function muppiWarpAffine_32f_C3R

![][public]

MUppStatus muppiWarpAffine_32f_C3R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, const double aCoeffs[2][3], int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const double aCoeffs
  • int eInterpolation

Return type: MUppStatus


Affine Transform Batch

Details of the warp affine operation are described above in the WarpAffine section. WarpAffineBatch generally takes the same parameter list as WarpAffine except that there is a list of N instances of those parameters (N blockquote {"type":"element","name":"blockquote","attributes":{},"children":[{"type":"element","name":"para","attributes":{},"children":[{"type":"element","name":"zwj","attributes":{},"children":[]},{"type":"text","text":"1) and that list is passed in device memory. A convenient data structure is "}]},{"type":"text","text":"\n"}]}provided that allows for easy initialization of the parameter lists. The aTransformedCoeffs array is for internal use only and should not be directly initialized by the application. The only restriction on these functions is that there is one single source ROI rectangle and one single destination ROI rectangle which are 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. A single set of oSrcRectROI and oDstRectROI values are applied to each source image and destination image in the batch. Source and destination image sizes may vary but oSmallestSrcSize must be set to the smallest source and image size in the batch. The parameters in the MUppiWarpAffineBatchCXR structure represent the corresponding per-image muppiWarpAffine parameters for each image in the batch. The MUppiWarpAffineBatchCXR array must be in device memory. The muppiWarpAffineBatchInit function MUST be called AFTER the application has initialized the array of MUppiWarpAffineBatchCXR structures and BEFORE calling any of the muppiWarpAffineBatch functions to so that the aTransformedCoeffs array can be internally pre-initialized for each image in the batch. The batch size passed to muppiWarpAffineBatchInit must match the batch size passed to the corresponding warp affine batch function.

WarpAffineBatch supports the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC

Codes

The warp affine primitives return the following error codes:

  • ::MUPP_RECTANGLE_ERROR if either destination ROI width or height is less than 1 pixel.
  • ::MUPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.
  • ::MUPP_SIZE_ERROR if source size width or height is less than 2

pixels.

Common parameters for muppiWarpAffineBatch functions include:

Parameters:

  • oSmallestSrcSize: Size in pixels of the entire smallest source image width and height, may be from different images.
  • oSrcRectROI: Region of interest in the source images.
  • oDstRectROI: Region of interest in the destination images.
  • eInterpolation: The type of eInterpolation to perform resampling. Currently limited to MUPPI_INTER_NN, MUPPI_INTER_LINEAR, or MUPPI_INTER_CUBIC.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiWarpAffineBatchCXR structures.
  • nBatchSize: Number of MUppiWarpAffineBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Affine Transform Utility

Functions The set of affine transform utility functions.

Functions

Function muppiGetAffineTransform

![][public]

MUppStatus muppiGetAffineTransform(MUppiRect oSrcROI, const double aQuad[4][2], double aCoeffs[2][3])

Computes affine transform coefficients based on source ROI and destination quadrilateral.

The function computes the coefficients of an affine transformation that maps the given source ROI (axis aligned rectangle with integer coordinates) to a quadrilateral in the destination image.

An affine transform in 2D is fully determined by the mapping of just three vertices. This function's API allows for passing a complete quadrilateral effectively making the prolem overdetermined. What this means in practice is, that for certain quadrilaterals it is not possible to find an affine transform that would map all four corners of the source ROI to the four vertices of that quadrilateral.

The function circumvents this problem by only looking at the first three vertices of the destination image quadrilateral to determine the affine transformation's coefficients. If the destination quadrilateral is indeed one that cannot be mapped using an affine transformation the functions informs the user of this situation by returning a MUPP_AFFINE_QUAD_INCORRECT_WARNING.

Parameters:

  • oSrcROI: The source ROI. This rectangle needs to be at least one pixel wide and high. If either width or hight are less than one an MUPP_RECTANGLE_ERROR is returned.
  • aQuad: The destination quadrilateral.
  • aCoeffs: The resulting affine transform coefficients.

Returns:

Error codes:

Parameters:

  • const double aQuad
  • double aCoeffs

Return type: MUppStatus

Function muppiGetAffineQuad

![][public]

MUppStatus muppiGetAffineQuad(MUppiRect oSrcROI, double aQuad[4][2], const double aCoeffs[2][3])

Compute shape of transformed image.

This method computes the quadrilateral in the destination image that the source ROI is transformed into by the affine transformation expressed by the coefficients array (aCoeffs).

Parameters:

  • oSrcROI: The source ROI.
  • aQuad: The resulting destination quadrangle.
  • aCoeffs: The afine transform coefficients.

Returns:

Error codes:

Parameters:

  • double aQuad
  • const double aCoeffs

Return type: MUppStatus

Function muppiGetAffineBound

![][public]

MUppStatus muppiGetAffineBound(MUppiRect oSrcROI, double aBound[2][2], const double aCoeffs[2][3])

Compute bounding-box of transformed image.

The method effectively computes the bounding box (axis aligned rectangle) of the transformed source ROI (see muppiGetAffineQuad()).

Parameters:

  • oSrcROI: The source ROI.
  • aBound: The resulting bounding box.
  • aCoeffs: The afine transform coefficients.

Returns:

Error codes:

Parameters:

  • double aBound
  • const double aCoeffs

Return type: MUppStatus


Backwards Affine Transform

Transforms (warps) an image based on an affine transform.

The affine transform is given as a formula {"type":"element","name":"formula","attributes":{"id":"24"},"children":[{"type":"text","text":"$2\\times 3$"}]} matrix C. A pixel location formula {"type":"element","name":"formula","attributes":{"id":"25"},"children":[{"type":"text","text":"$(x, y)$"}]} in the source image is mapped to the location formula {"type":"element","name":"formula","attributes":{"id":"26"},"children":[{"type":"text","text":"$(x', y')$"}]} in the destination image. The destination image coorodinates fullfil the following properties: formula {"type":"element","name":"formula","attributes":{"id":"33"},"children":[{"type":"text","text":"\\[\n x = c_{00} * x' + c_{01} * y' + c_{02} \\qquad\n y = c_{10} * x' + c_{11} * y' + c_{12} \\qquad\n C = \\left[ \\matrix{c_{00} & c_{01} & c_{02} \\cr\n c_{10} & c_{11} & c_{12} } \\right]\n \\]"}]} In other words, given matrix formula {"type":"element","name":"formula","attributes":{"id":"34"},"children":[{"type":"text","text":"$C$"}]} the source image's shape is transfored to the destination image using the inverse matrix formula {"type":"element","name":"formula","attributes":{"id":"35"},"children":[{"type":"text","text":"$C^{-1}$"}]}: formula {"type":"element","name":"formula","attributes":{"id":"36"},"children":[{"type":"text","text":"\\[\n M = C^{-1} = \\left[ \\matrix{m_{00} & m_{01} & m_{02} \\cr\n m_{10} & m_{11} & m_{12} } \\right]\n x' = m_{00} * x + m_{01} * y + m_{02} \\qquad\n y' = m_{10} * x + m_{11} * y + m_{12} \\qquad\n \\]"}]}

Common parameters for muppiWarpAffineBack packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Affine transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes

Common parameters for muppiWarpAffineBack planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Affine transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes


Backwards Perspective Transform

Transforms (warps) an image based on a perspective transform.

The perspective transform is given as a formula {"type":"element","name":"formula","attributes":{"id":"37"},"children":[{"type":"text","text":"$3\\times 3$"}]} matrix C. A pixel location formula {"type":"element","name":"formula","attributes":{"id":"25"},"children":[{"type":"text","text":"$(x, y)$"}]} in the source image is mapped to the location formula {"type":"element","name":"formula","attributes":{"id":"26"},"children":[{"type":"text","text":"$(x', y')$"}]} in the destination image. The destination image coorodinates fullfil the following properties: formula {"type":"element","name":"formula","attributes":{"id":"40"},"children":[{"type":"text","text":"\\[\n x = \\frac{c_{00} * x' + c_{01} * y' + c_{02}}{c_{20} * x' + c_{21} * y' +\nc_{22}} \\qquad\n y = \\frac{c_{10} * x' + c_{11} * y' + c_{12}}{c_{20} * x' + c_{21} * y' +\nc_{22}}\n \\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"39"},"children":[{"type":"text","text":"\\[\n C = \\left[ \\matrix{c_{00} & c_{01} & c_{02} \\cr\n c_{10} & c_{11} & c_{12} \\cr\n c_{20} & c_{21} & c_{22} } \\right]\n \\]"}]} In other words, given matrix formula {"type":"element","name":"formula","attributes":{"id":"34"},"children":[{"type":"text","text":"$C$"}]} the source image's shape is transfored to the destination image using the inverse matrix formula {"type":"element","name":"formula","attributes":{"id":"35"},"children":[{"type":"text","text":"$C^{-1}$"}]}: formula {"type":"element","name":"formula","attributes":{"id":"41"},"children":[{"type":"text","text":"\\[\n M = C^{-1} = \\left[ \\matrix{m_{00} & m_{01} & m_{02} \\cr\n m_{10} & m_{11} & m_{12} \\cr\n m_{20} & m_{21} & m_{22} } \\right]\n x' = \\frac{c_{00} * x + c_{01} * y + c_{02}}{c_{20} * x + c_{21} * y +\nc_{22}} \\qquad\n y' = \\frac{c_{10} * x + c_{11} * y + c_{12}}{c_{20} * x + c_{21} * y +\nc_{22}}\n \\]"}]}

Common parameters for muppiWarpPerspectiveBack packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Perspective transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes

Common parameters for muppiWarpPerspectiveBack planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Perspective transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes


IQABatch

Primitives for computing the image quality for a batch of image pairs, such as MSE, PSNR, SSIM, and MS-SSIM with a single roi_specification for all pairs of input images


IQABatchAdvanced

Primitives for computing the image quality for a batch of image pairs, such as MSE, PSNR, SSIM, and MS-SSIM with per-image roi_specification


BGRToCbYCr422

BGR to CbYCr422 color conversion.


BGRToCbYCr422_709HDTV

BGR to CbYCr422_709HDTV color conversion.


BGRToHLS

BGR to HLS color conversion.


BGRToLab

BGR to Lab color conversion.

This is how MUPP converts gamma corrected BGR or RGB to Lab using the CIE Lab D65 white point with a Y luminance of 1.0. The computed values of the L component are in the range [0..100], a and b component values are in the range [-128..127]. The code uses cbrtf() the 32 bit floating point cube root math function.

// use CIE Lab chromaticity coordinates #define nCIE_LAB_D65_xn 0.950455F #define nCIE_LAB_D65_yn 1.0F #define nCIE_LAB_D65_zn 1.088753F // First convert to XYZ MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nX = 0.412453F * nNormalizedR + 0.35758F * nNormalizedG + 0.180423F

  • nNormalizedB; MUpp32f nY = 0.212671F * nNormalizedR + 0.71516F * nNormalizedG + 0.072169F * nNormalizedB; MUpp32f nZ = 0.019334F * nNormalizedR
  • 0.119193F * nNormalizedG + 0.950227F * nNormalizedB; MUpp32f nL = cbrtf(nY); MUpp32f nA; MUpp32f nB; MUpp32f nfX = nX * 1.052128F; // / nCIE_LAB_D65_xn; MUpp32f nfY = nY; MUpp32f nfZ = nZ * 0.918482F; // / nCIE_LAB_D65_zn; nfY = nL
  • 16.0F; nL = 116.0F * nL - 16.0F; nA = cbrtf(nfX) - 16.0F; nA = 500.0F
  • (nA - nfY); nB = cbrtf(nfZ) - 16.0F; nB = 200.0F * (nfY - nB); // Now scale Lab range nL = nL * 255.0F
  • 0.01F; // / 100.0F nA = nA + 128.0F; nB = nB + 128.0F; L = (MUpp8u)nL; a = (MUpp8u)nA; b = (MUpp8u)nB;

BGRToNV12

BGR to NV12 color conversion.

Functions

Function muppiBGRToNV12_8u_C3P2R

![][public]

MUppStatus muppiBGRToNV12_8u_C3P2R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst[2], int rDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[2]"}]} -->

  • int rDstStep

Return type: MUppStatus


BGRToYCbCr

BGR to YCbCr color conversion.


BGRToYCbCr411

BGR to YCbCr411 color conversion.


BGRToYCbCr420

BGR to YCbCr420 color conversion.

Functions

Function muppiBGRToYCbCr420_8u_C3P3R

![][public]

MUppStatus muppiBGRToYCbCr420_8u_C3P3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst[3], int rDstStep[3], MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

  • int rDstStep

Return type: MUppStatus


BGRToYCbCr420_709CSC

BGR to YCbCr420_709CSC color conversion.


BGRToYCbCr420_709HDTV

BGR to YCbCr420_709HDTV color conversion.


BGRToYCbCr422

BGR to YCbCr422 color conversion.


BGRToYCrCb420

BGR to YCrCb420 color conversion.


BGRToYCrCb420_709CSC

BGR to YCrCb420_709CSC color conversion.


BGRToYUV

BGR to YUV color conversion.

Here is how MUPP converts gamma corrected RGB or BGR to YUV. For digital RGB values in the range [0..255], Y has the range [0..255], U varies in the range [-112..+112], and V in the range [-157..+157]. To fit in the range of [0..255], a constant value of 128 is added to computed U and V values, and V is then saturated.

// For MUpp8u data MUpp32f nY = 0.299F * R + 0.587F * G + 0.114F * B; MUpp32f nU = (0.492F * ((MUpp32f)nB - nY)) + 128.0F; MUpp32f nV = (0.877F * ((MUpp32f)nR - nY)) + 128.0F; if (nV > 255.0F) nV = 255.0F;

// For MUpp32f data(normalized to [0,1]) MUpp32f nY = 0.299F * R + 0.587F * G + 0.114F * B; MUpp32f nU = (0.492F * ((MUpp32f)nB - nY)) + 0.5F; MUpp32f nV = (0.877F * ((MUpp32f)nR - nY)) + 0.5F; if (nV > 1.0F) nV = 1.0F;

Functions

Function muppiBGRToYUV_8u_C3R

![][public]

MUppStatus muppiBGRToYUV_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiBGRToYUV_32f_C3R

![][public]

MUppStatus muppiBGRToYUV_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 32-bit float packed BGR to 3 channel 32-bit float packed YUV color conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


BGRToYUV420

BGR to YUV420 color conversion.


CbYCr422ToRGB

CbYCr422 to RGB color conversion.


CbYCr422ToBGR

CbYCr422 to BGR color conversion.


CbYCr422ToBGR_709HDTV

CbYCr422 to BGR_709HDTV color conversion.


Compare_image_difference_to_constant_with_epsilon_operations

Compare Image Difference With Constant Within Epsilon Operations Compare differences between image pixels and constant within an epsilon value 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 MUPP_MAX_8U.

Common parameters for muppiCompareEqualEpsC functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • nConstant: constant value for single channel functions.
  • pConstants: pointer to a list of constants, one per color channel for multi-channel image functions.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • nEpsilon: epsilon tolerance value to compare to per color channel pixel absolute differences
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Compare Image

Differences With Epsilon Operations Compare the pixels value differences of two images with an epsilon value 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 MUPP_MAX_8U.

Common parameters for muppiCompareEqualEps functions include:

Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • nEpsilon: epsilon tolerance value to compare to pixel absolute differences
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Compare Image With Constant

Operations Compare the pixels of an image with a constant value 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 MUPP_MAX_8U.

Common parameters for muppiCompareC functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • nConstant: constant value for single channel functions.
  • pConstants: pointer to a list of constant values, one per color channel for multi-channel functions.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eComparisonOperation: Specifies the comparison operation to be used in the pixel comparison.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiCompareC_16s_C1R

![][public]

MUppStatus muppiCompareC_16s_C1R(const MUpp16s *pSrc, int nSrcStep, const MUpp16s nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppCmpOp eComparisonOperation)

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp16s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiCompareC_16s_C3R

![][public]

MUppStatus muppiCompareC_16s_C3R(const MUpp16s *pSrc, int nSrcStep, const MUpp16s *pConstants, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppCmpOp eComparisonOperation)

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp16s * pConstants
  • int nDstStep

Return type: MUppStatus

Function muppiCompareC_32f_C1R

![][public]

MUppStatus muppiCompareC_32f_C1R(const MUpp32f *pSrc, int nSrcStep, const MUpp32f nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppCmpOp eComparisonOperation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiCompareC_32f_C3R

![][public]

MUppStatus muppiCompareC_32f_C3R(const MUpp32f *pSrc, int nSrcStep, const MUpp32f *pConstants, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppCmpOp eComparisonOperation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f * pConstants
  • int nDstStep

Return type: MUppStatus


Compare Images Operations

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 MUPP_MAX_8U.

Common parameters for muppiCompare functions include:

Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eComparisonOperation: Specifies the comparison operation to be used in the pixel comparison.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MUPP Core

Basic functions for library management, in particular library version and device property query functions.

Functions

Function muppGetLibVersion

![][public]

const MUppLibraryVersion * muppGetLibVersion(void)

Get the MUPP library version.

Returns:

A struct containing separate values for major and minor revision and build number.

Parameters:

  • void

Return type: const MUppLibraryVersion *

Function muppGetStream

![][public]

musaStream_t muppGetStream(void)

Get the MUPP MUSA stream. MUPP enables concurrent device tasks via a global stream state varible. The MUPP stream by default is set to stream 0, i.e. non-concurrent mode. A user can set the MUPP stream to any valid MUSA stream. All MUSA commands issued by MUPP (e.g. kernels launched by the MUPP library) are then issed to that MUPP stream.

Parameters:

  • void

Return type: musaStream_t

Function muppSetStream

![][public]

MUppStatus muppSetStream(musaStream_t hStream)

Set the MUPP MUSA stream. This function now returns an error if a problem occurs with Musa stream management. This function should only be called if a call to muppGetStream() returns a stream number which is different from the desired stream since unnecessarily flushing the current stream can significantly affect performance.

See also: muppGetStream()

Parameters:

  • musaStream_t hStream

Return type: MUppStatus


CrossCorrFull_Norm

Primitives for computing the normalized cross correlation between two images with full mode.


CrossCorrFull_NormLevel

Primitives for computing the normalized cross correlation coefficient between two images with full mode.


CrossCorrSame_Norm

Primitives for computing the normalized cross correlation between two images with same mode.


CrossCorrSame_NormLevel

Primitives for computing the normalized cross correlation coefficient between two images with same mode.


CrossCorrValid

Primitives for computing the cross correlation between two images with valid mode.


CrossCorrValid_Norm

Primitives for computing the normalized cross correlation between two images with valid mode.


CrossCorrValid_NormLevel

Primitives for computing the normalized cross correlation coefficient between two images with valid mode.


Fixed Filters

Fixed filters perform linear filtering operations (such as convolutions) with predefined kernels of fixed sizes. Note that this section also contains a few dynamic kernel filters, namely GaussAdvanced and Bilateral.

Some of the fixed filters have versions with border control. For these functions, if any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported for these functions.

Submodules


HLSToBGR

HLS to BGR color conversion.


HLSToRGB

HLS to RGB color conversion.

This is how MUPP converts HLS to gamma corrected RGB or BGR.

MUpp32f nNormalizedH = (MUpp32f)H * 0.003921569F; // / 255.0F MUpp32f nNormalizedL = (MUpp32f)L * 0.003921569F; MUpp32f nNormalizedS = (MUpp32f)S * 0.003921569F; MUpp32f nM1; MUpp32f nM2; MUpp32f nR; MUpp32f nG; MUpp32f nB; MUpp32f nh = 0.0F; if (nNormalizedL <= 0.5F) nM2 = nNormalizedL * (1.0F + nNormalizedS); else nM2 = nNormalizedL + nNormalizedS - nNormalizedL * nNormalizedS; nM1 = 2.0F * nNormalizedL - nM2; if (nNormalizedS == 0.0F) nR = nG = nB = nNormalizedL; else { nh = nNormalizedH + 0.3333F; if (nh > 1.0F) nh -= 1.0F; } MUpp32f nMDiff = nM2 - nM1; if (0.6667F < nh) nR = nM1; else { if (nh < 0.1667F) nR = (nM1 + nMDiff * nh * 6.0F); // / 0.1667F else if (nh < 0.5F) nR = nM2; else nR = nM1 + nMDiff * ( 0.6667F - nh ) * 6.0F; // / 0.1667F } if (nR > 1.0F) nR = 1.0F; nh = nNormalizedH; if (0.6667F < nh) nG = nM1; else { if (nh < 0.1667F) nG = (nM1 + nMDiff * nh * 6.0F); // / 0.1667F else if (nh < 0.5F) nG = nM2; else nG = nM1 + nMDiff * (0.6667F - nh ) * 6.0F; // / 0.1667F } if (nG > 1.0F) nG = 1.0F; nh = nNormalizedH - 0.3333F; if (nh < 0.0F) nh += 1.0F; if (0.6667F < nh) nB = nM1; else { if (nh < 0.1667F) nB = (nM1 + nMDiff * nh * 6.0F); // / 0.1667F else if (nh < 0.5F) nB = nM2; else nB = nM1 + nMDiff * (0.6667F - nh ) * 6.0F; // / 0.1667F } if (nB > 1.0F) nB = 1.0F; R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG * 255.0F); B = (MUpp8u)(nB * 255.0F);


HSVToRGB

HSV to RGB color conversion.

This is how MUPP converts HSV to gamma corrected RGB or BGR. This code uses the floorf() 32 bit floating point math function.

MUpp32f nNormalizedH = (MUpp32f)H * 0.003921569F; // / 255.0F MUpp32f nNormalizedS = (MUpp32f)S * 0.003921569F; MUpp32f nNormalizedV = (MUpp32f)V * 0.003921569F; MUpp32f nR; MUpp32f nG; MUpp32f nB; if (nNormalizedS == 0.0F) { nR = nG = nB = nNormalizedV; } else { if (nNormalizedH == 1.0F) nNormalizedH = 0.0F; else nNormalizedH = nNormalizedH * 6.0F; // / 0.1667F } MUpp32f nI = floorf(nNormalizedH); MUpp32f nF = nNormalizedH - nI; MUpp32f nM = nNormalizedV * (1.0F - nNormalizedS); MUpp32f nN = nNormalizedV * (1.0F - nNormalizedS * nF); MUpp32f nK = nNormalizedV * (1.0F - nNormalizedS * (1.0F - nF)); if (nI == 0.0F) { nR = nNormalizedV; nG = nK; nB = nM; } else if (nI == 1.0F) { nR = nN; nG = nNormalizedV; nB = nM; } else if (nI == 2.0F) { nR = nM; nG = nNormalizedV; nB = nK; } else if (nI == 3.0F) { nR = nM; nG = nN; nB = nNormalizedV; } else if (nI == 4.0F) { nR = nK; nG = nM; nB = nNormalizedV; } else if (nI == 5.0F) { nR = nNormalizedV; nG = nM; nB = nN; } R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG * 255.0F); B = (MUpp8u)(nB * 255.0F);


1D Linear Filter

The set of 1D linear filtering functions available in the library.

Submodules


1D Window Column Sum

1D mask Window Column Sum for 8 and 16 bit images.

Common parameters for muppiSumWindowColumn functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: Y offset of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


1D Window Sum

The set of 1D window sum functions available in the library.

Submodules


1D Window Sum with Border Control

The set of 1D window sum functions with border control available in the library.

Submodules


2D Fixed Linear Filters

The set of 2D fixed linear filtering functions available in the library.

Submodules


JPEG Color Conversion

The set of JPEG color conversion functions available in the library.


Norm_L1

Primitives for computing the L1 norm of an image.

Basic Norm_L1

Function muppiNorm_L1_32f_C1R

![][public]

MUppStatus muppiNorm_L1_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f *pNorm, MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiNorm_L1_32f_C3R

![][public]

MUppStatus muppiNorm_L1_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f aNorm[3], MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

Return type: MUppStatus

NormL1GetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the Norm_L1 primitives.

Function muppiNormL1GetBufferHostSize_32f_C1R

![][public]

MUppStatus muppiNormL1GetBufferHostSize_32f_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiNormL1GetBufferHostSize_32f_C3R

![][public]

MUppStatus muppiNormL1GetBufferHostSize_32f_C3R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus


NormDiff_L1

Primitives for computing the L1 norm of difference of pixels between two images.


NormRel_L1

Primitives for computing the relative error of L1 norm between two images.


Norm_L2

Primitives for computing the L2 norm of an image.

Basic Norm_L2

Computes the L2 norm of an image.

Function muppiNorm_L2_32f_C1R

![][public]

MUppStatus muppiNorm_L2_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f *pNorm, MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiNorm_L2_32f_C3R

![][public]

MUppStatus muppiNorm_L2_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f aNorm[3], MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

Return type: MUppStatus

NormL2GetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the Norm_L2 primitives.

Function muppiNormL2GetBufferHostSize_32f_C1R

![][public]

MUppStatus muppiNormL2GetBufferHostSize_32f_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiNormL2GetBufferHostSize_32f_C3R

![][public]

MUppStatus muppiNormL2GetBufferHostSize_32f_C3R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus


NormDiff_L2

Primitives for computing the L2 norm of difference of pixels between two images.


NormRel_L2

Primitives for computing the relative error of L2 norm between two images.


Abs

Absolute value of each pixel value in an image.


AbsDiff

Pixel by pixel absolute difference between two images.

Functions

Function muppiAbsDiff_8u_C1R

![][public]

MUppStatus muppiAbsDiff_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAbsDiff_8u_C3R

![][public]

MUppStatus muppiAbsDiff_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAbsDiff_8u_C4R

![][public]

MUppStatus muppiAbsDiff_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAbsDiff_16u_C1R

![][public]

MUppStatus muppiAbsDiff_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAbsDiff_32f_C1R

![][public]

MUppStatus muppiAbsDiff_32f_C1R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f *pSrc2, int nSrc2Step, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus


AbsDiffC

Determines absolute difference between each pixel of an image and a constant value.


Add

Pixel by pixel addition of two images.


AddC

Adds a constant value to each pixel of an image.

Functions

Function muppiAddC_32f_C1R

![][public]

MUppStatus muppiAddC_32f_C1R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f nConstant, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAddC_32f_C1IR

![][public]

MUppStatus muppiAddC_32f_C1IR(const MUpp32f nConstant, MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAddC_32f_C3R

![][public]

MUppStatus muppiAddC_32f_C3R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f aConstants[3], MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAddC_32f_C3IR

![][public]

MUppStatus muppiAddC_32f_C3IR(const MUpp32f aConstants[3], MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f aConstants
  • int nSrcDstStep

Return type: MUppStatus


AddProduct

Pixel by pixel addition of product of pixels from two source images to floating point pixel values of destination image.


AddSquare

Pixel by pixel addition of squared pixels from source image to floating point pixel values of destination image.


AddWeighted

Pixel by pixel addition of alpha weighted pixel values from a source image to floating point pixel values of destination image.


Affine Transforms

The set of affine transform functions available in the library.

Affine Transform Error Codes

Submodules


Alpha Composition

The set of alpha composition operations available in the library.

Submodules


AlphaComp

Composite two images using alpha opacity values contained in each image.

Functions

Function muppiAlphaComp_32f_AC1R

![][public]

MUppStatus muppiAlphaComp_32f_AC1R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f *pSrc2, int nSrc2Step, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiAlphaOp eAlphaOp)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAlphaComp_32f_AC4R

![][public]

MUppStatus muppiAlphaComp_32f_AC4R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f *pSrc2, int nSrc2Step, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiAlphaOp eAlphaOp)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus


AlphaCompC

Composite two images using constant alpha values.


AlphaPremul

Premultiplies image pixels by image alpha opacity values.


AlphaPremulC

Premultiplies pixels of an image using a constant alpha value.


And

Pixel by pixel logical and of images.

Functions

Function muppiAnd_8u_C1R_Ctx

![][public]

MUppStatus muppiAnd_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C1R

![][public]

MUppStatus muppiAnd_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C1IR_Ctx

![][public]

MUppStatus muppiAnd_8u_C1IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_8u_C1IR

![][public]

MUppStatus muppiAnd_8u_C1IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_8u_C3R_Ctx

![][public]

MUppStatus muppiAnd_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C3R

![][public]

MUppStatus muppiAnd_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C3IR_Ctx

![][public]

MUppStatus muppiAnd_8u_C3IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_8u_C3IR

![][public]

MUppStatus muppiAnd_8u_C3IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_8u_C4R_Ctx

![][public]

MUppStatus muppiAnd_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C4R

![][public]

MUppStatus muppiAnd_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_8u_C4IR_Ctx

![][public]

MUppStatus muppiAnd_8u_C4IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_8u_C4IR

![][public]

MUppStatus muppiAnd_8u_C4IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C1R_Ctx

![][public]

MUppStatus muppiAnd_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C1R

![][public]

MUppStatus muppiAnd_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C1IR_Ctx

![][public]

MUppStatus muppiAnd_16u_C1IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C1IR

![][public]

MUppStatus muppiAnd_16u_C1IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C3R_Ctx

![][public]

MUppStatus muppiAnd_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C3R

![][public]

MUppStatus muppiAnd_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C3IR_Ctx

![][public]

MUppStatus muppiAnd_16u_C3IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C3IR

![][public]

MUppStatus muppiAnd_16u_C3IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C4R_Ctx

![][public]

MUppStatus muppiAnd_16u_C4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C4R

![][public]

MUppStatus muppiAnd_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_16u_C4IR_Ctx

![][public]

MUppStatus muppiAnd_16u_C4IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_16u_C4IR

![][public]

MUppStatus muppiAnd_16u_C4IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C1R_Ctx

![][public]

MUppStatus muppiAnd_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C1R

![][public]

MUppStatus muppiAnd_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C1IR_Ctx

![][public]

MUppStatus muppiAnd_32s_C1IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C1IR

![][public]

MUppStatus muppiAnd_32s_C1IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C3R_Ctx

![][public]

MUppStatus muppiAnd_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C3R

![][public]

MUppStatus muppiAnd_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C3IR_Ctx

![][public]

MUppStatus muppiAnd_32s_C3IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C3IR

![][public]

MUppStatus muppiAnd_32s_C3IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C4R_Ctx

![][public]

MUppStatus muppiAnd_32s_C4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical and. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C4R

![][public]

MUppStatus muppiAnd_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiAnd_32s_C4IR_Ctx

![][public]

MUppStatus muppiAnd_32s_C4IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel in place image logical and. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiAnd_32s_C4IR

![][public]

MUppStatus muppiAnd_32s_C4IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus


AndC

Pixel by pixel logical and of an image with a constant.

Functions

Function muppiAndC_8u_C1R_Ctx

![][public]

MUppStatus muppiAndC_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_C1R

![][public]

MUppStatus muppiAndC_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_C3R_Ctx

![][public]

MUppStatus muppiAndC_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_C3R

![][public]

MUppStatus muppiAndC_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_AC4R_Ctx

![][public]

MUppStatus muppiAndC_8u_AC4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical and with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_AC4R

![][public]

MUppStatus muppiAndC_8u_AC4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_C4R_Ctx

![][public]

MUppStatus muppiAndC_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_8u_C4R

![][public]

MUppStatus muppiAndC_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C1R_Ctx

![][public]

MUppStatus muppiAndC_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C1R

![][public]

MUppStatus muppiAndC_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C3R_Ctx

![][public]

MUppStatus muppiAndC_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C3R

![][public]

MUppStatus muppiAndC_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_AC4R_Ctx

![][public]

MUppStatus muppiAndC_16u_AC4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical and with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_AC4R

![][public]

MUppStatus muppiAndC_16u_AC4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C4R_Ctx

![][public]

MUppStatus muppiAndC_16u_C4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_16u_C4R

![][public]

MUppStatus muppiAndC_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_C1R_Ctx

![][public]

MUppStatus muppiAndC_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_C1R

![][public]

MUppStatus muppiAndC_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_C3R_Ctx

![][public]

MUppStatus muppiAndC_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical and with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_C3R

![][public]

MUppStatus muppiAndC_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_AC4R_Ctx

![][public]

MUppStatus muppiAndC_32s_AC4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical and with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_AC4R

![][public]

MUppStatus muppiAndC_32s_AC4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiAndC_32s_C4R

![][public]

MUppStatus muppiAndC_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[4], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus


Arithmetic and Logical

Operations

These functions can be found in the muppial library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.


Arithmetic Operations

The set of image processing arithmetic operations available in the library.

Submodules


AverageError

Primitives for computing the average error between two images. Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the average error is defined as: formula {"type":"element","name":"formula","attributes":{"id":"119"},"children":[{"type":"text","text":"\\[Average Error =\n\\frac{1}{W\\cdot H\\cdot\nN}\\sum_{n=0}^{N-1}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\left|pSrc1(j,i) -\npSrc2(j,i)\\right|\\]"}]} where N stands for the number of channels. If the image is in complex format, the absolute value is used for computation.


AverageRelativeError

Primitives for computing the average relative error between two images. Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the maximum relative error is defined as: formula {"type":"element","name":"formula","attributes":{"id":"121"},"children":[{"type":"text","text":"\\[AverageRelativeError = \\frac{1}{W\\cdot H\\cdot\nN}\\sum_{n=0}^{N-1}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\frac{\\left|pSrc1(j,i) -\npSrc2(j,i)\\right|}{max(\\left|pSrc1(j,i)\\right|, \\left|pSrc2(j,i)\\right|)}\\]"}]} where N is the number of channels. If the image is in complex format, the absolute value is used for computation.


Channel Copy

The channel copy primitives copy a single color channel from a multi-channel source image to any other color channel in a multi-channel destination image. The channel is selected by adjusting the respective image pointers to point to the desired color channel (see channel_of_interest).

Common parameters for muppiCopy_CXC functions include:

Parameters:

  • pSrc: select_source_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: select_destination_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Channel Set

The selected-channel set primitives set a single color channel in multi-channel images to a given value. The channel is selected by adjusting the pDst pointer to point to the desired color channel (see channel_of_interest).

Common parameters for muppiSet_CXC functions include:

Parameters:

  • nValue: The pixel-value to be set.
  • pDst: select_destination_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


ColorLUT

Perform image color processing using members of various types of color look up tables.


ColorLUTLinear

Perform image color processing using linear interpolation between members of various types of color look up tables.

Functions

Function muppiLUT_Linear_8u_C1R

![][public]

MUppStatus muppiLUT_Linear_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp32s *pValues, const MUpp32s *pLevels, int nLevels)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32s * pValues
  • const MUpp32s * pLevels
  • int nLevels

Return type: MUppStatus


ColorLUTTrilinear

Perform image color processing using 3D trilinear interpolation between members of various types of color look up tables.


ColorLUTCubic

Perform image color processing using linear interpolation between members of various types of color look up tables.


ColorLUTPalette

Perform image color processing using various types of bit range restricted palette color look up tables.


Color and Sampling Conversion

Routines manipulating an image's color model and sampling format.

These functions can be found in the muppicc library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


ColorDebayer

Grayscale Color Filter Array to RGB Color Debayer conversion.

Generates one RGB color pixel for every grayscale source pixel. Source and destination images must have even width and height. Missing pixel colors are generated using bilinear interpolation with chroma correlation of generated green values (eInterpolation MUST be set to 0). eGrid allows the user to specify the Bayer grid registration position at source image location oSrcROI.x, oSrcROI.y relative to pSrc. Possible registration positions are:

MUPPI_BAYER_BGGR MUPPI_BAYER_RGGB MUPPI_BAYER_GBRG MUPPI_BAYER_GRBG

B G R G G B G R G R G B R G B G

If it becomes necessary to access source pixels outside source image then the source image borders are mirrored.

Here is how the algorithm works. R, G, and B base pixels from the source image are used unmodified. To generate R values for those G pixels, the average of R(x - 1, y) and R(x + 1, y) or R(x, y - 1) and R(x, y + 1) is used depending on whether the left and right or top and bottom pixels are R base pixels. To generate B values for those G pixels, the same algorithm is used using nearest B values. For an R base pixel, if there are no B values in the upper, lower, left, or right adjacent pixels then B is the average of B values in the 4 diagonal (G base) pixels. The same algorithm is used using R values to generate the R value of a B base pixel. Chroma correlation is applied to generated G values only, for a B base pixel G(x - 1, y) and G(x + 1, y) are averaged or G(x, y - 1) and G(x, y + 1) are averaged depending on whether the absolute difference between B(x, y) and the average of B(x - 2, y) and B(x + 2, y) is smaller than the absolute difference between B(x, y) and the average of B(x, y - 2) and B(x, y + 2). For an R base pixel the same algorithm is used testing against the surrounding R values at those offsets. If the horizontal and vertical differences are the same at one of those pixels then the average of the four left, right, upper and lower G values is used instead.

Functions

Function muppiCFAToRGB_8u_C1C3R_Ctx

![][public]

MUppStatus muppiCFAToRGB_8u_C1C3R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcROI, MUpp8u *pDst, int nDstStep, MUppiBayerGridPosition eGrid, MUppiInterpolationMode eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 8-bit unsigned packed CFA grayscale Bayer pattern to 3 channel 8-bit unsigned packed RGB conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: full source image width and height relative to pSrc.
  • oSrcROI: rectangle specifying starting source image pixel x and y location relative to pSrc and ROI width and height.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step.
  • eGrid: enumeration value specifying bayer grid registration position at location oSrcROI.x, oSrcROI.y relative to pSrc.
  • eInterpolation: MUST be MUPPI_INTER_UNDEFINED
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCFAToRGB_8u_C1C3R

![][public]

MUppStatus muppiCFAToRGB_8u_C1C3R(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcROI, MUpp8u *pDst, int nDstStep, MUppiBayerGridPosition eGrid, MUppiInterpolationMode eInterpolation)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCFAToRGB_16u_C1C3R_Ctx

![][public]

MUppStatus muppiCFAToRGB_16u_C1C3R_Ctx(const MUpp16u *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcROI, MUpp16u *pDst, int nDstStep, MUppiBayerGridPosition eGrid, MUppiInterpolationMode eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 16-bit unsigned packed CFA grayscale Bayer pattern to 3 channel 16-bit unsigned packed RGB conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: full source image width and height relative to pSrc.
  • oSrcROI: rectangle specifying starting source image pixel x and y location relative to pSrc and ROI width and height.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step.
  • eGrid: enumeration value specifying bayer grid registration position at location oSrcROI.x, oSrcROI.y relative to pSrc.
  • eInterpolation: MUST be MUPPI_INTER_UNDEFINED
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCFAToRGB_16u_C1C3R

![][public]

MUppStatus muppiCFAToRGB_16u_C1C3R(const MUpp16u *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcROI, MUpp16u *pDst, int nDstStep, MUppiBayerGridPosition eGrid, MUppiInterpolationMode eInterpolation)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Color Gamma Correction

Routines for correcting image color gamma.


Color Model Conversion

Routines for converting between various image color models.

Submodules


Color Processing

Routines for performing image color manipulation.

Submodules


Color Sampling Format

Conversion

Routines for converting between various image color sampling formats.


ColorToGray Conversion

Routines for converting color images to grayscale.

RGBToGray

RGB to CCIR601 Gray conversion.

Here is how MUPP converts gamma corrected RGB to CCIR601 Gray.

nGray = 0.299F * R + 0.587F * G + 0.114F * B;

Function muppiRGBToGray_32f_C3C1R

![][public]

MUppStatus muppiRGBToGray_32f_C3C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiGrayToRGB_32f_C1C3R

![][public]

MUppStatus muppiGrayToRGB_32f_C1C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

1 channel 32-bit floating point packed Gary to 3 channel 32-bit floating point packed RGB conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


ColorTwist

Routines for converting between various image color models using user supplied matrix coefficients.

ColorTwist

Perform color twist pixel processing. Color twist consists of applying the following formula to each image pixel using coefficients from the user supplied color twist host matrix array 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.

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]

Function muppiColorTwist32f_8u_C1R

![][public]

MUppStatus muppiColorTwist32f_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp32f aTwist[3][4])

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f aTwist

Return type: MUppStatus

Function muppiColorTwist32f_8u_C3R

![][public]

MUppStatus muppiColorTwist32f_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp32f aTwist[3][4])

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f aTwist

Return type: MUppStatus


ColorTwistBatch

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

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]

Function muppiColorTwistBatch32f_8u_C1R_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C1R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

1 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C1R

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C1R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C1IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C1IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

1 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C1IR

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C1IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C3R_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C3R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

3 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C3R

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C3R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C3IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C3IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

3 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C3IR

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C3IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C4R_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C4R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

4 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C4R

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C4R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C4IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C4IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

4 channel 8-bit unsigned integer 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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch32f_8u_C4IR

![][public]

MUppStatus muppiColorTwistBatch32f_8u_C4IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C1R_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C1R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C1R

![][public]

MUppStatus muppiColorTwistBatch_32f_C1R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C1IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C1IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C1IR

![][public]

MUppStatus muppiColorTwistBatch_32f_C1IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C3R_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C3R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C3R

![][public]

MUppStatus muppiColorTwistBatch_32f_C3R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C3IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C3IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C3IR

![][public]

MUppStatus muppiColorTwistBatch_32f_C3IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C4R_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C4R_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C4R

![][public]

MUppStatus muppiColorTwistBatch_32f_C4R(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C4IR_Ctx

![][public]

MUppStatus muppiColorTwistBatch_32f_C4IR_Ctx(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize, MUppStreamContext muppStreamCtx)

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: roi_specification.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiColorTwistBatchCXR structures.
  • nBatchSize: Number of MUppiColorTwistBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nBatchSize

Return type: MUppStatus

Function muppiColorTwistBatch_32f_C4IR

![][public]

MUppStatus muppiColorTwistBatch_32f_C4IR(MUpp32f nMin, MUpp32f nMax, MUppiSize oSizeROI, MUppiColorTwistBatchCXR *pBatchList, int nBatchSize)

Parameters:

  • int nBatchSize

Return type: MUppStatus


Comparison Operations

Compare the pixels of two images or one image and a constant value 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 MUPP_MAX_8U.

Submodules


Complement Color Key

Routines for performing complement color key replacement.


Computer Vision

image_filter_gradient_vector_sobel_border

The set of computer vision functions available in the library.

Submodules


Convert Bit Depth

Functions for converting bit depth without scaling.

Submodules


Convert To Decreased Bit Depth

The integer conversion methods do not involve any scaling. When converting floating-point values to integers the user may choose the most appropriate rounding-mode. Typically information is lost when converting to lower bit depth:

  • All converted values are saturated to the destination type's range. E.g. any values larger than the largest value of the destination type are clamped to the destination's maximum.

  • Converting floating-point values to integer also involves rounding, effectively loosing all fractional value information in the process.

Note that all pointers and step sizes for images with 16f (MUpp16f) data types perform best when they are at least 16 byte aligned.

Common parameters for muppiConvert to decreased bit depth functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eRoundMode: rounding_mode_parameter.
  • nScaleFactor: integer_result_scaling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Convert To Increased Bit Depth

The integer conversion methods do not involve any scaling. Also, even when increasing the bit-depth loss of information may occur:

  • When converting integers (e.g. MUpp32u) to float (e.g. MUpp32f) integer value not accurately representable by the float are rounded to the closest floating-point value.

  • When converting signed integers to unsigned integers all negative values are lost (saturated to 0).

Note that all pointers and step sizes for images with 16f (MUpp16f) data types perform best when they are at least 16 byte aligned.

Common parameters for muppiConvert to increased bit depth functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Convolution

The set convolution functions available in the library.

Submodules


Copy

Copy pixels from one image to another.

Common parameters for muppiCopy functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiCopy_32f_C1R

![][public]

MUppStatus muppiCopy_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32f_C3R

![][public]

MUppStatus muppiCopy_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C1R_Ctx

![][public]

MUppStatus muppiCopy_32fc_C1R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

32-bit floating-point complex image copy.

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

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C1R

![][public]

MUppStatus muppiCopy_32fc_C1R(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C2R_Ctx

![][public]

MUppStatus muppiCopy_32fc_C2R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Two-channel 32-bit floating-point complex image copy.

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

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C2R

![][public]

MUppStatus muppiCopy_32fc_C2R(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C3R_Ctx

![][public]

MUppStatus muppiCopy_32fc_C3R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three-channel 32-bit floating-point complex image copy.

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

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C3R

![][public]

MUppStatus muppiCopy_32fc_C3R(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C4R_Ctx

![][public]

MUppStatus muppiCopy_32fc_C4R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four-channel 32-bit floating-point complex image copy.

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

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiCopy_32fc_C4R

![][public]

MUppStatus muppiCopy_32fc_C4R(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Copy Constant Border

Methods for copying images and padding borders with a constant, user-specifiable color.

Common parameters for muppiCopyConstBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSizeROI: Size of the source region of pixels.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image (inner part) and constant border color (outer part).
  • nTopBorderHeight: Height (in pixels) of the top border. The number of pixel rows at the top of the destination ROI that will be filled with the constant border color. nBottomBorderHeight = oDstSizeROI.height - nTopBorderHeight - oSrcSizeROI.height.
  • nLeftBorderWidth: Width (in pixels) of the left border. The width of the border at the right side of the destination ROI is implicitly defined by the size of the source ROI: nRightBorderWidth = oDstSizeROI.width - nLeftBorderWidth - oSrcSizeROI.width.
  • nValue: The pixel value to be set for border pixels for single channel functions.
  • aValue: Vector of the RGBA values of the border pixels to be set for multi-channel functions.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiCopyConstBorder_8u_C1R

![][public]

MUppStatus muppiCopyConstBorder_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp8u *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth, MUpp8u nValue)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus

Function muppiCopyConstBorder_32f_C1R

![][public]

MUppStatus muppiCopyConstBorder_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth, MUpp32f nValue)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus

Function muppiCopyConstBorder_32f_C3R

![][public]

MUppStatus muppiCopyConstBorder_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth, const MUpp32f aValue[3])

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth
  • const MUpp32f aValue

Return type: MUppStatus


Image Copy Operations

Functions for copying image pixels.

Submodules


Copy Replicate Border

Methods for copying images and padding borders with a replicates of the nearest source image pixel color.

Common parameters for muppiCopyReplicateBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSizeROI: Size of the source region of pixels.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image (inner part) and nearest source image pixel color (outer part).
  • nTopBorderHeight: Height (in pixels) of the top border. The number of pixel rows at the top of the destination ROI that will be filled with the nearest source image pixel color. nBottomBorderHeight = oDstSizeROI.height - nTopBorderHeight - oSrcSizeROI.height.
  • nLeftBorderWidth: Width (in pixels) of the left border. The width of the border at the right side of the destination ROI is implicitly defined by the size of the source ROI: nRightBorderWidth = oDstSizeROI.width - nLeftBorderWidth - oSrcSizeROI.width.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiCopyReplicateBorder_32f_C1R

![][public]

MUppStatus muppiCopyReplicateBorder_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus

Function muppiCopyReplicateBorder_32f_C3R

![][public]

MUppStatus muppiCopyReplicateBorder_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus


Copy Sub-Pixel

Functions for copying linearly interpolated images using source image subpixel coordinates.

Common parameters for muppiCopySubpix functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image, source image ROI is assumed to be same as destination image ROI.
  • nDx: Fractional part of source image X coordinate.
  • nDy: Fractional part of source image Y coordinate.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Copy Wrap Border

Methods for copying images and padding borders with wrapped replications of the source image pixel colors.

Common parameters for muppiCopyWrapBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSizeROI: Size of the source region of pixels.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image (inner part) and a border consisting of wrapped replication of the source image pixel colors (outer part).
  • nTopBorderHeight: Height (in pixels) of the top border. The number of pixel rows at the top of the destination ROI that will be filled with the wrapped replication of the corresponding column of source image pixels colors. nBottomBorderHeight = oDstSizeROI.height - nTopBorderHeight - oSrcSizeROI.height.
  • nLeftBorderWidth: Width (in pixels) of the left border. The width of the border at the right side of the destination ROI is implicitly defined by the size of the source ROI: nRightBorderWidth = oDstSizeROI.width - nLeftBorderWidth - oSrcSizeROI.width.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiCopyWrapBorder_32f_C1R

![][public]

MUppStatus muppiCopyWrapBorder_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus

Function muppiCopyWrapBorder_32f_C3R

![][public]

MUppStatus muppiCopyWrapBorder_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int nTopBorderHeight, int nLeftBorderWidth)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth

Return type: MUppStatus


CountInRange.

Primitives for computing the amount of pixels that fall into the specified intensity range.


Crop

Common parameters for muppiCrop functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSizeROI: Size of the source region of pixels.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image (inner part) and constant border color (outer part).
  • mode: Padding mode, choose for border padding.
  • nTopBorderHeight: Height (in pixels) of the top border. The number of pixel rows at the top of the destination ROI that will be filled with the constant border color. nBottomBorderHeight = oDstSizeROI.height - nTopBorderHeight - oSrcSizeROI.height.
  • nLeftBorderWidth: Width (in pixels) of the left border. The width of the border at the right side of the destination ROI is implicitly defined by the size of the source ROI: nRightBorderWidth = oDstSizeROI.width - nLeftBorderWidth - oSrcSizeROI.width.
  • values: The pixel value to be set for border pixels for single channel functions.

Returns:

image_data_error_codes, * roi_error_codes

Functions

Function muppiCrop_32f_C1R

![][public]

MUppStatus muppiCrop_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, MUppiCopyPaddingMode mode, int nTopBorderHeight, int nLeftBorderWidth, const MUpp32f *values)

crop a grayscale image

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

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth
  • const MUpp32f * values

Return type: MUppStatus

Function muppiCrop_32f_C3R

![][public]

MUppStatus muppiCrop_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSizeROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, MUppiCopyPaddingMode mode, int nTopBorderHeight, int nLeftBorderWidth, const MUpp32f *values)

crop a RGB image

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

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int nTopBorderHeight
  • int nLeftBorderWidth
  • const MUpp32f * values

Return type: MUppStatus


Data Exchange and

Initialization

Functions for initializing, copying and converting image data.

These functions can be found in the muppidei library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


Dilation

Dilation computes the output pixel as the maximum pixel value of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the maximum search.

It is the user's responsibility to avoid sampling_beyond_image_boundaries.

Common parameters for muppiDilate functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiDilate_8u_C1R_Ctx

![][public]

MUppStatus muppiDilate_8u_C1R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Single-channel 8-bit unsigned integer dilation.

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

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_8u_C1R

![][public]

MUppStatus muppiDilate_8u_C1R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_8u_C3R_Ctx

![][public]

MUppStatus muppiDilate_8u_C3R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Three-channel 8-bit unsigned integer dilation.

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

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_8u_C3R

![][public]

MUppStatus muppiDilate_8u_C3R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_8u_C4R_Ctx

![][public]

MUppStatus muppiDilate_8u_C4R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Four-channel 8-bit unsigned integer dilation.

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

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_8u_C4R

![][public]

MUppStatus muppiDilate_8u_C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C1R_Ctx

![][public]

MUppStatus muppiDilate_32f_C1R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Single-channel 32-bit floating-point dilation.

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

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C1R

![][public]

MUppStatus muppiDilate_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C3R_Ctx

![][public]

MUppStatus muppiDilate_32f_C3R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Three-channel 32-bit floating-point dilation.

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

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C3R

![][public]

MUppStatus muppiDilate_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C4R_Ctx

![][public]

MUppStatus muppiDilate_32f_C4R_Ctx(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Four-channel 32-bit floating-point dilation.

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

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiDilate_32f_C4R

![][public]

MUppStatus muppiDilate_32f_C4R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus


Dilate3x3

Dilation using a 3x3 mask with the anchor at its center pixel.

It is the user's responsibility to avoid sampling_beyond_image_boundaries.

Common parameters for muppiDilate3x3 functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Dilate3x3Border

Dilation using a 3x3 mask with the anchor at its center pixel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiDilate3x3Border functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Dilation with border control

Dilation computes the output pixel as the maximum pixel value of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the maximum search. For gray scale dilation the mask contains signed mask values which are added to the corresponding source image sample value before determining the maximun value after clamping.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiDilateBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Div

Pixel by pixel division of two images.


DivC

Divides each pixel of an image by a constant value.

Functions

Function muppiDivC_32f_C1R

![][public]

MUppStatus muppiDivC_32f_C1R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f nConstant, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiDivC_32f_C1IR

![][public]

MUppStatus muppiDivC_32f_C1IR(const MUpp32f nConstant, MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiDivC_32f_C3R

![][public]

MUppStatus muppiDivC_32f_C3R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f aConstants[3], MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiDivC_32f_C3IR

![][public]

MUppStatus muppiDivC_32f_C3IR(const MUpp32f aConstants[3], MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f aConstants
  • int nSrcDstStep

Return type: MUppStatus


Div_Round

Pixel by pixel division of two images using result rounding modes.


DotProd

Primitives for computing the dot product of two images.


Duplicate Channel

Functions for duplicating a single channel image in a multiple channel image.

Common parameters for muppiDup functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstSizeROI: Size (width, height) of the destination region, i.e. the region that gets filled with data from the source image, source image ROI is assumed to be same as destination image ROI.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiDup_32f_C1C3R

![][public]

MUppStatus muppiDup_32f_C1C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Erode

Erosion computes the output pixel as the minimum pixel value of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the maximum search.

It is the user's responsibility to avoid sampling_beyond_image_boundaries.

Common parameters for muppiErode functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiErode_8u_C1R_Ctx

![][public]

MUppStatus muppiErode_8u_C1R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Single-channel 8-bit unsigned integer erosion.

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

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_8u_C1R

![][public]

MUppStatus muppiErode_8u_C1R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_8u_C3R_Ctx

![][public]

MUppStatus muppiErode_8u_C3R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Three-channel 8-bit unsigned integer erosion.

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

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_8u_C3R

![][public]

MUppStatus muppiErode_8u_C3R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_8u_C4R_Ctx

![][public]

MUppStatus muppiErode_8u_C4R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Four-channel 8-bit unsigned integer erosion.

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

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_8u_C4R

![][public]

MUppStatus muppiErode_8u_C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C1R_Ctx

![][public]

MUppStatus muppiErode_32f_C1R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Single-channel 32-bit floating-point erosion.

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

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C1R

![][public]

MUppStatus muppiErode_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C3R_Ctx

![][public]

MUppStatus muppiErode_32f_C3R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Three-channel 32-bit floating-point erosion.

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

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C3R

![][public]

MUppStatus muppiErode_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C4R_Ctx

![][public]

MUppStatus muppiErode_32f_C4R_Ctx(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppStreamContext muppStreamCtx)

Four-channel 32-bit floating-point erosion.

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

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus

Function muppiErode_32f_C4R

![][public]

MUppStatus muppiErode_32f_C4R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp8u * pMask

Return type: MUppStatus


Erode3x3

Erosion using a 3x3 mask with the anchor at its center pixel.

It is the user's responsibility to avoid sampling_beyond_image_boundaries.

Common parameters for muppiErode3x3 functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Erode3x3Border

Erosion using a 3x3 mask with the anchor at its center pixel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiErode3x3Border functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Erosion with border control

Erosion computes the output pixel as the minimum pixel value of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the minimum search. For gray scale erosion the mask contains signed mask values which are added to the corresponding source image sample value before determining the minimum value after clamping.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiErodeBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Exp

Exponential value of each pixel in an image.


Extract Channel Copy

The channel extract primitives copy a single color channel from a multi-channel source image to singl-channel destination image. The channel is selected by adjusting the source image pointer to point to the desired color channel (see channel_of_interest).

Common parameters for muppiCopy_CXC1 functions include:

Parameters:

  • pSrc: select_source_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Filter

General purpose 2D convolution filter.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. Before writing the result pixel the sum is scaled back via division by nDivisor.

Common parameters for muppiFilter functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • oKernelSize: Width and Height of the rectangular kernel.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


1D Window Column Sum

Border 1D mask Window Column Sum for 8 and 16 bit images with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiSumWindowColumnBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oROI roi_specification. nMaskSize Length of the linear kernel array.
  • nAnchor: Y offset of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


1D Window Row Sum

1D mask Window Row Sum for 8 and 16 bit images.

Common parameters for muppiSumWindowRow functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


1D Window Row Sum Border

1D mask Window Row Sum for 8 and 16 bit images with border control.

Common parameters for muppiSumWindowRowBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oROI roi_specification. nMaskSize Length of the linear kernel array.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Filter32f

General purpose 2D convolution filter using floating point weights.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed.

Common parameters for muppiFilter32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • oKernelSize: Width and Height of the rectangular kernel.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterBilateralGaussBorder

Filters the image using a bilateral Gaussian filter kernel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

For this filter the anchor point is always the central element of the kernel. Coefficients of the bilateral filter kernel depend on their position in the kernel and on the value of some source image pixels overlayed by the filter kernel. Only source image pixels with both coordinates divisible by nDistanceBetweenSrcPixels are used in calculations.

The value of an output pixel formula {"type":"element","name":"formula","attributes":{"id":"13"},"children":[{"type":"text","text":"$d$"}]} is formula {"type":"element","name":"formula","attributes":{"id":"14"},"children":[{"type":"text","text":"\\[d =\n\\frac{\\sum_{h=-nRadius}^{nRadius}\\sum_{w=-nRadius}^{nRadius}W1(h,w)\\cdot\nW2(h,w)\\cdot\nS(h,w)}{\\sum_{h=-nRadius}^{nRadius}\\sum_{w=-nRadius}^{nRadius}W1(h,w)\\cdot\nW2(h,w)}\\]"}]} where h and w are the corresponding kernel width and height indexes, S(h,w) is the value of the source image pixel overlayed by filter kernel position (h,w), W1(h,w) is func(nValSquareSigma, (S(h,w) - S(0,0))) where S(0,0) is the value of the source image pixel at the center of the kernel, W2(h,w) is func(nPosSquareSigma, sqrt(hh+ww)), and func is the following formula formula {"type":"element","name":"formula","attributes":{"id":"15"},"children":[{"type":"text","text":"\\[func(S,I) = exp(-\\frac{I^2}{2.0F\\cdot S^2})\\]"}]}

Currently only the MUPP_BORDER_REPLICATE border type operations are supported.

Common parameters for muppiFilterBilateralGaussBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. nRadius The radius of the round filter kernel to be used. A radius of 1 indicates a filter kernel size of 3 by 3, 2 indicates 5 by 5, etc. Radius values from 1 to 32 are supported.
  • nStepBetweenSrcPixels: The step size between adjacent source image pixels processed by the filter kernel, most commonly 1.
  • nValSquareSigma: The square of the sigma for the relative intensity distance between a source image pixel in the filter kernel and the source image pixel at the center of the filter kernel.
  • nPosSquareSigma: The square of the sigma for the relative geometric distance between a source image pixel in the filter kernel and the source image pixel at the center of the filter kernel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterBorder

General purpose 2D convolution filter with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. Before writing the result pixel the sum is scaled back via division by nDivisor. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • oKernelSize: Width and Height of the rectangular kernel.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterBorder32f

General purpose 2D convolution filter using floating-point weights with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. Before writing the result pixel the sum is scaled back via division by nDivisor. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterBorder32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • oKernelSize: Width and Height of the rectangular kernel.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


BoundSegments

Note that these functions have been deprecated. Use the muppiLabelMarkerUF, muppiCompressMarkerLabelsUF, and muppiCompressedMarkerLabelsUFInfo functions to generate connected pixel region boundaries (contours).


FilterBox

Computes the average pixel values of the pixels under a rectangular mask.

Common parameters for muppiFilterBox functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oMaskSize: Width and Height of the neighborhood region for the local Avg operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiFilterBox_8u_C1R

![][public]

MUppStatus muppiFilterBox_8u_C1R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBox_8u_C3R

![][public]

MUppStatus muppiFilterBox_8u_C3R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBox_8u_C4R

![][public]

MUppStatus muppiFilterBox_8u_C4R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBox_32f_C1R

![][public]

MUppStatus muppiFilterBox_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterBox_32f_C3R

![][public]

MUppStatus muppiFilterBox_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterBox_32f_C4R

![][public]

MUppStatus muppiFilterBox_32f_C4R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus


FilterBoxBorder

Computes the average pixel values of the pixels under a rectangular mask with border control. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

,Common parameters for muppiFilterBoxBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. oMaskSize Width and Height of the neighborhood region for the local Avg operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiFilterBoxBorder_8u_C1R

![][public]

MUppStatus muppiFilterBoxBorder_8u_C1R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBoxBorder_8u_C3R

![][public]

MUppStatus muppiFilterBoxBorder_8u_C3R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBoxBorder_8u_C4R

![][public]

MUppStatus muppiFilterBoxBorder_8u_C4R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterBoxBorder_32f_C1R

![][public]

MUppStatus muppiFilterBoxBorder_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterBoxBorder_32f_C3R

![][public]

MUppStatus muppiFilterBoxBorder_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterBoxBorder_32f_C4R

![][public]

MUppStatus muppiFilterBoxBorder_32f_C4R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUppiBorderType eBorderType)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus


FilterCannyBorder

Performs Canny edge detection on a single channel 8-bit grayscale image and outputs a single channel 8-bit image consisting of 0x00 and 0xFF values with 0xFF representing edge pixels.

The algorithm consists of three phases. The first phase generates two output images consisting of a single channel 16-bit signed image containing magnitude values and a single channel 32-bit floating point image containing the angular direction of those magnitude values. This phase is accomplished by calling the appropriate GradientVectorBorder filter function based on the filter type, filter mask size, and norm type requested. The next phase uses those magnitude and direction images to suppress non-maximum magnitude values which are lower than the values of either of its two nearest neighbors in the same direction as the test magnitude pixel in the 3x3 surrounding magnitude pixel neighborhood. This phase outputs a new magnitude image with non-maximum pixel values suppressed. Finally, in the third phase, the new magnitude image is passed through a hysteresis threshold filter that filters out any magnitude values that are not connected to another edge magnitude value. In this phase, any magnitude value above the high threshold value is automatically accepted, any magnitude value below the low threshold value is automatically rejected. For magnitude values that lie between the low and high threshold, values are only accepted if one of their two neighbors in the same direction in the 3x3 neighborhood around them lies above the low threshold value. In other words, if they are connected to an active edge. J. Canny recommends that the ratio of high to low threshold limit be in the range two or three to one, based on predicted signal-to-noise ratios. The final output of the third phase consists of a single channel 8-bit unsigned image of 0x00 and 0xFF values based on whether they are accepted or rejected during threshold testing.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported. Borderless output can be accomplished by using a larger source image than the destination and adjusting oSrcSize and oSrcOffset parameters accordingly.

Functions

Function muppiFilterCannyBorderGetBufferSize

![][public]

MUppStatus muppiFilterCannyBorderGetBufferSize(MUppiSize oSizeROI, int *hpBufferSize)

Calculate scratch buffer size needed for the FilterCannyBorder function based on destination image SizeROI width and height.

Parameters:

  • oSizeROI: roi_specification.
  • hpBufferSize: Required buffer size. Important: hpBufferSize is a host pointer. general_scratch_buffer.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiFilterCannyBorder_8u_C1R

![][public]

MUppStatus muppiFilterCannyBorder_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppiDifferentialKernel eFilterType, MUppiMaskSize eMaskSize, MUpp16s nLowThreshold, MUpp16s nHighThreshold, MUppiNorm eNorm, MUppiBorderType eBorderType, MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


FilterColumn

Apply convolution filter with user specified 1D column of weights.

Result pixel is equal to the sum of the products between the kernel coefficients (pKernel array) and corresponding neighboring column pixel values in the source image defined by nKernelDim and nAnchorY, divided by nDivisor.

Common parameters for muppiFilterColumn functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coefficients are expected to be stored in reverse order.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: Y offset of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterColumn32f

FilterColumn using floating-point weights.

Common parameters for muppiFilterColumn32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coefficients are expected to be stored in reverse order.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: Y offset of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterColumnBorder

General purpose 1D convolution column filter with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. Before writing the result pixel the sum is scaled back via division by nDivisor. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterColumnBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • nMaskSize: Width of the kernel.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterColumnBorder32f

General purpose 1D column convolution filter using floating-point weights with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterColumnBorder32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • nMaskSize: Width of the kernel.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


CompressMarkerLabels

Removes sparseness between marker label IDs output from LabelMarkers call.

CompressMarkerLabelsGetBufferSize

Before calling any of the CompressMarkerLabels functions the application first needs to call the corresponding CompressMarkerLabelsGetBufferSize function to determine the amount of device memory to allocate as a working buffer. The application allocated device memory is then passed as the pBuffer parameter to the corresponding CompressMarkerLabels function.

Function muppiCompressMarkerLabelsGetBufferSize_32u_C1R

![][public]

MUppStatus muppiCompressMarkerLabelsGetBufferSize_32u_C1R(int nStartingNumber, int *hpBufferSize)

Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous muppiLabelMarkers call. Note that this is the only function that supports the muppiCompressMarkerLabelsUF_32u function and that nStartingNumber MUST be ROI width * ROI height when used with that function.

Parameters:

  • nStartingNumber: The value returned from a previous call to the muppiLabelMarkers_32u function or ROI width * ROI height for images generated by the muppiLabelMarkersUF function and those values MUST match the values used those used in that call.
  • hpBufferSize: Required buffer size in bytes.

Parameters:

  • int nStartingNumber
  • int * hpBufferSize

Return type: MUppStatus

CompressMarkerLabels

NOTE: The previous versions of these functions have been deprecated. Only muppiCompressMarkerLabelsUF_32u works with output from muppiLabelMarkersUF functions.

Function muppiCompressMarkerLabelsUF_32u_C1IR

![][public]

MUppStatus muppiCompressMarkerLabelsUF_32u_C1IR(MUpp32u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, int nStartingNumber, int *pNewNumber, MUpp8u *pBuffer)

Parameters:

  • int nSrcDstStep
  • int nStartingNumber
  • int * pNewNumber

Return type: MUppStatus

CompressMarkerLabelsUFBatch

Renumber connected region marker label IDs from one or more previous calls to

Renumbers 1-channel 32-bit unsigned integer label markers generated by muppiLabelMarkersUF functions and eliminates numbering sparseness for each image ROI.

Parameters:

  • pSrcDstBatchList: source_batch_images_pointer device memory pointer to the list of device memory image descriptors, per image oSize ROI is used.
  • pBufferList: Device memory pointer to the list of MUppiBufferDescriptor buffer descriptors specifying per image device memory buffer pointers and sizes as returned by per image CompressMarkerLabelsGetBufferSize calls.
  • pNewMaxLabelIDList: Device memory pointer at least nBatchSize * sizeof(MUpp32u) bytes which will contain the returned per image new maximum label ID.
  • nBatchSize: Number of MUppiImageDescriptor, MUppiBufferDescriptor, and new max number structures/values processed in this call (must be > 1).
  • oMaxSizeROI: roi_specification maximum ROI width and height of ALL images in the batch, MUST match the ROI used when the label markers UF image was generated.
  • nLargestPerImageBufferSize: The value of the the largest per image buffer size value returned by the per image calls to CompressMarkerLabelsGetBufferSize for the images in the batch list.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Function muppiCompressMarkerLabelsUFBatch_32u_C1IR_Advanced_Ctx

![][public]

MUppStatus muppiCompressMarkerLabelsUFBatch_32u_C1IR_Advanced_Ctx(MUppiImageDescriptor *pSrcDstBatchList, MUppiBufferDescriptor *pBufferList, unsigned int *pNewMaxLabelIDList, int nBatchSize, MUppiSize oMaxSizeROI, int nLargestPerImageBufferSize, MUppStreamContext muppStreamCtx)

Parameters:

  • unsigned int * pNewMaxLabelIDList
  • int nBatchSize
  • int nLargestPerImageBufferSize

Return type: MUppStatus


Image_filter_compresssed_marker_labels_info

CompressedMarkerLabelsInfo Various methods for extracting information from compressed marker labels.


FilterDistanceTransform

Performs Exact Euclidean Distance Transform function using the Parallel Banding Algorithm (PBA+) defined by Tiow-Seng Tan, et al paper named "Parallel Banding Algorithm to Compute Exact Distance Transform with the GPU" published dated August 8, 2019.

Output for these functions is an optional 16-bit signed integer voronoi diagram (pairs of signed 16 bit integer x, y distance values) and/or an optional true euclidean distance transform image generated from the internal voronoi diagram in either unsigned 16-bit truncated integer format or 32-bit floating point format. Additional optional output can include an signed 16-bit integer Voronoi diagram containing site indices and/or a signed 16-bit integer Voronoi diagram containing relative Manhattan distances to the closest sites. Minimum and maximum image ROI widths and heights are 64 and 32767.

The nMinSiteValue and nMaxSiteValue parameters can be used to control which source image pixels are considered sites(traditionally 0) and non-sites (everything else).


FloodFill

image_filter_histogram_of_oriented_gradients_border

Flood fill a connected region of an image with a specified new value.


FilterGauss

Filters the image using a Gaussian filter kernel. Use FilterGaussAdvanced if you want to supply your own filter coefficients.

Note that all FilterGauss functions currently support mask sizes up to 15x15. Filter kernels for these functions are calculated using a sigma value of 0.4F

  • (mask width / 2) * 0.6F.

Common parameters for muppiFilterGauss functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiFilterGauss_32f_C1R

![][public]

MUppStatus muppiFilterGauss_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterGauss_32f_C3R

![][public]

MUppStatus muppiFilterGauss_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus


FilterGaussAdvanced

Filters the image using a separable Gaussian filter kernel with user supplied floating point coefficients:

Common parameters for muppiFilterGaussAdvanced functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • nFilterTaps: The number of filter taps where nFilterTaps = 2 * ((int)((float)ceil(radius) + 0.5F) ) + 1.
  • pKernel: Pointer to an array of nFilterTaps kernel coefficients which sum to 1.0F.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterGaussAdvancedBorder

Filters the image using a separable Gaussian filter kernel with user supplied floating point coefficients with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Note that the performance of these functions can drop significantly for filter kernels with a very large number of taps.

Currently only the MUPP_BORDER_REPLICATE and MUPP_BORDER_MIRROR border type operations are supported.

Common parameters for muppiFilterGaussAdvancedBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. nFilterTaps The number of filter taps where nFilterTaps = 2 * ((int)((float)ceil(radius) + 0.5F) ) + 1.
  • pKernel: Pointer to an array of nFilterTaps kernel coefficients which sum to 1.0F.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterGaussBorder

Filters the image using a Gaussian filter kernel with border control. Use FilterGaussAdvancedBorder if you want to supply your own filter coefficients.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Note that all FilterGaussBorder functions currently support mask sizes up to 15x15. Filter kernels for these functions are calculated using a sigma value of 0.4F + (mask width / 2) * 0.6F.

Common parameters for muppiFilterGaussBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eMaskSize Enumeration value specifying the mask size.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Image_filter_gauss_pyramid_layer_down_border

FilterGaussPyramidLayerDownBorder Filters the image using a separable Gaussian filter kernel with user supplied floating point coefficients with downsampling and border control.

If the downsampling rate is equivalent to an integer value then unnecessary source pixels are just skipped. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_MIRROR and MUPP_BORDER_REPLICATE border type operations are supported.

Common parameters for muppiFilterGaussPyramidLayerDownBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. nRate The downsampling rate to be used. For integer equivalent rates unnecessary source pixels are just skipped. For non-integer rates the source image is bilinear interpolated. nRate must be blockquote {"type":"element","name":"blockquote","attributes":{},"children":[{"type":"element","name":"para","attributes":{},"children":[{"type":"element","name":"zwj","attributes":{},"children":[]},{"type":"text","text":"1.0F and <= 10.0F."}]},{"type":"text","text":"\n"}]}
  • nFilterTaps: The number of filter taps where

nFilterTaps = 2 * ((int)((float)ceil(radius) + 0.5F) ) + 1. Parameters:

  • pKernel: Pointer to an array of nFilterTaps kernel coefficients which sum to 1.0F.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Image_filter_gauss_pyramid_layer_up_border

FilterGaussPyramidLayerUpBorder Filters the image using a separable Gaussian filter kernel with user supplied floating point coefficients with upsampling and border control.

If the upsampling rate is equivalent to an integer value then unnecessary source pixels are just skipped. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_MIRROR and MUPP_BORDER_REPLICATE border type operations are supported.

Common parameters for muppiFilterGaussPyramidLayerUpBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. nRate The upsampling rate to be used. For integer equivalent rates unnecessary source pixels are just skipped. For non-integer rates the source image is bilinear interpolated. nRate must be > 1.0F and <= 10.0F.
  • nFilterTaps: The number of filter taps where nFilterTaps = 2
  • ((int)((float)ceil(radius) + 0.5F) ) + 1.
  • pKernel: Pointer to an array of nFilterTaps kernel coefficients which sum to 1.0F.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Image_filter_gradient_vector_prewitt_border

GradientVectorPrewittBorder

RGB Color to Prewitt Gradient Vector conversion using user selected fixed mask size and gradient distance method. Functions support up to 4 optional single channel output gradient vectors, X (vertical), Y (horizontal), magnitude, and angle with user selectable distance methods. Output for a particular vector is disabled by supplying a NULL pointer for that vector. X and Y gradient vectors are in cartesian form in the destination data type. Magnitude vectors are polar gradient form in the destination data type, angle is always in floating point polar gradient format. Only fixed mask

Function muppiGradientVectorPrewittBorder_8u16s_C1R

![][public]

MUppStatus muppiGradientVectorPrewittBorder_8u16s_C1R( const MUpp8u* pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp16s* pDstX, int nDstXStep, MUpp16s* pDstY, int nDstYStep, MUpp16s* pDstMag, int nDstMagStep, MUpp32f* pDstAngle, int nDstAngleStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppiNorm eNorm, MUppiBorderType eBorderType);

Return type: MUppStatus

Function muppiGradientVectorPrewittBorder_8u16s_C3C1R

![][public]

MUppStatus muppiGradientVectorPrewittBorder_8u16s_C3C1R( const MUpp8u* pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiPoint oSrcOffset, MUpp16s* pDstX, int nDstXStep, MUpp16s* pDstY, int nDstYStep, MUpp16s* pDstMag, int nDstMagStep, MUpp32f* pDstAngle, int nDstAngleStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppiNorm eNorm, MUppiBorderType eBorderType);

Return type: MUppStatus

Image_filter_gradient_vector_scharr_border

image_filter_gradient_vector_prewitt_border

GradientVectorScharrBorder

RGB Color to Scharr Gradient Vector conversion using user selected fixed mask size and gradient distance method. Functions support up to 4 optional single channel output gradient vectors, X (vertical), Y (horizontal), magnitude, and angle with user selectable distance methods. Output for a particular vector is disabled by supplying a NULL pointer for that vector. X and Y gradient vectors are in cartesian form in the destination data type. Magnitude vectors are polar gradient form in the destination data type, angle is always in floating point polar gradient format. Only fixed mask

Image_filter_gradient_vector_sobel_border

image_filter_gradient_vector_scharr_border

GradientVectorSobelBorder

RGB Color to Sobel Gradient Vector conversion using user selected fixed mask size and gradient distance method. Functions support up to 4 optional single channel output gradient vectors, X (vertical), Y (horizontal), magnitude, and angle with user selectable distance methods. Output for a particular vector is disabled by supplying a NULL pointer for that vector. X and Y gradient vectors are in cartesian form in the destination data type. Magnitude vectors are polar gradient form in the destination data type, angle is always in floating point polar gradient format. Only fixed mask sizes of 3x3 and 5x5

FilterHarrisCornersBorder

Performs Harris Corner detection on a single channel 8-bit grayscale image and outputs a single channel 32-bit floating point image consisting the corner response at each pixel of the image.

The algorithm consists of two phases. The first phase generates the floating point product of XX, YY, and XY gradients at each pixel in the image. The type of gradient used is controlled by the eFilterType and eMaskSize parameters. The second phase averages those products over a window of either 3x3 or 5x5 pixels around the center pixel then generates the Harris corner response at that pixel which is output in the destination image. The Harris response value is determined as H = ((XX * YY - XY * XY) - (nK * ((XX

  • YY) * (XX + YY)))) * nScale.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported. Borderless output can be accomplished by using a larger source image than the destination and adjusting oSrcSize and oSrcOffset parameters accordingly.


FilterHighPass

Filters the image using a high-pass filter kernel.

Common parameters for muppiFilterHighPass functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"16"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1 & -1 & -1 \\\\\n -1 & 8 & -1 \\\\\n -1 & -1 & -1 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & 24 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n \\end{array} \\right)\n\\]"}]}


FilterHighPassBorder

Filters the image using a high-pass filter kernel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterHighPassBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eMaskSize Enumeration value specifying the mask size.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"16"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1 & -1 & -1 \\\\\n -1 & 8 & -1 \\\\\n -1 & -1 & -1 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & 24 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n -1 & -1 & -1 & -1 & -1 \\\\\n \\end{array} \\right)\n\\]"}]}


Image_filter_histogram_of_oriented_gradients_border

HistogramOfOrientedGradientsBorder Performs Histogram Of Oriented Gradients operation on source image generating separate windows of Histogram Descriptors for each requested location.

This function implements the simplest form of functionality described by N. Dalal and B. Triggs. Histograms of Oriented Gradients for Human Detection. INRIA, 2005. It supports overlapped contrast normalized block histogram output with L2 normalization only, no threshold clipping, and no pre or post gaussian smoothing of input images or histogram output values. It supports both single channel grayscale source images and three channel color images. For color images, the color channel with the highest magnitude value is used as that pixel's magnitude. Output is row order only. Descriptors are output consecutively with no separation padding if multiple descriptor output is requested (one desriptor per source image location). For example, common HOG parameters are 9 histogram bins per 8 by 8 pixel cell, 2 by 2 cells per block, with a descriptor window size of 64 horizontal by 128 vertical pixels yielding 7 by 15 overlapping blocks (1 cell overlap in both horizontal and vertical directions). This results in 9 bins * 4 cells * 7 horizontal overlapping blocks * 15 vertical overlapping blocks or 3780 32-bit floating point output values (bins) per descriptor window.

The number of horizontal overlapping block histogram bins per descriptor window width is determined by (((oHOGConfig.detectionWindowSize.width / oHOGConfig.histogramBlockSize) * 2)

      • oHOGConfig.nHistogramBins. The number of vertical overlapping block histograms per descriptor window height is determined by (((oHOGConfig.detectionWindowSize.height / oHOGConfig.histogramBlockSize) * 2) - 1) The offset of each descriptor window in the descriptors output buffer is therefore horizontal histogram bins per descriptor window width * vertical histograms per descriptor window height 32-bit floating point values relative to the previous descriptor window output.

The algorithm uses a 1D centered derivative mask of [-1, 0, +1] when generating input magnitude and angle gradients. Magnitudes are added to the two nearest histogram bins of oriented gradients between 0 and 180 degrees using a weighted linear interpolation of each magnitude value across the 2 nearest angular bin orientations. 2D overlapping blocks of histogram bins consisting of the bins from 2D arrangements of cells are then contrast normalized using L2 normalization and output to the corresponding histogram descriptor window for that particular window location in the window locations list.

Some restrictions include:

#define MUPP_HOG_MAX_CELL_SIZE (16) #define MUPP_HOG_MAX_BLOCK_SIZE (64) #define MUPP_HOG_MAX_BINS_PER_CELL (16) #define MUPP_HOG_MAX_CELLS_PER_DESCRIPTOR (256) #define MUPP_HOG_MAX_OVERLAPPING_BLOCKS_PER_DESCRIPTOR (256) #define MUPP_HOG_MAX_DESCRIPTOR_LOCATIONS_PER_CALL (128)

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterHistogramOfGradientsBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • hpLocations: Host pointer to array of MUppiPoint source pixel starting locations of requested descriptor windows. Important: hpLocations is a host pointer.
  • nLocations: Number of MUppiPoint in pLocations array.
  • pDstWindowDescriptorBuffer: Output device memory buffer pointer of size hpDescriptorsSize bytes to first of nLoc

FilterHoughLine

Extracts Hough lines from a single channel 8-bit binarized (0, 255) source feature (canny edges, etc.) image.

Outputs a list of lines in point polar format representing the length (rho) and angle (theta) of each line from the origin of the normal to the line using the formula rho = x cos(theta) + y sin(theta). The level of discretization, nDelta, is specified as an input parameter. The performance and effectiveness of this function highly depends on this parameter with higher performance for larger numbers and more detailed results for lower numbers. Also, lines are not guaranteed to be added to the pDeviceLines list in the same order from one call to the next. However, all of the same lines will still be generated as long as nMaxLineCount is set large enough so that they all can fit in the list. To convert lines in point polar format back to cartesian lines use the following formula: MUpp32f nHough = ((sqrt(2.0F) * static_cast<MUpp32f>(oSizeROI.height > oSizeROI.width ? oSizeROI.height : oSizeROI.width)) / 2.0F); int nAccumulatorsHeight = nDelta.rho > 1.0F ? static_cast<int>(ceil(nHough

  • 2.0F)) : static_cast<int>(ceil((nHough * 2.0F) / nDelta.rho)); int nCenterX = oSizeROI.width >> 1; int nCenterY = oSizeROI.height >> 1; MUpp32f nThetaRad = static_cast<MUpp32f>(deviceline.theta) * 0.0174532925199433F; MUpp32f nSinTheta = sin(nThetaRad); MUpp32f nCosTheta = cos(nThetaRad); int nX1, nY1, nX2, nY2;

if (deviceline.theta >= 45 && deviceline.theta <= 135) // degrees { // y = (rho - x cos(theta)) / sin(theta) nX1 = minimum cartesian X boundary value; nY1 = static_cast<int>((static_cast<MUpp32f>(deviceline.rho - (nAccumulatorsHeight >> 1)) - ((nX1 - nCenterX) * nCosTheta)) / nSinTheta + nCenterY); nX2 = maximum cartesian X boundary value; nY2 = static_cast<int>((static_cast<MUpp32f>(deviceline.rho - (nAccumulatorsHeight >> 1)) - ((nX2 - nCenterX) * nCosTheta)) / nSinTheta + nCenterY); } else { // x = (rho - y sin(theta)) / cos(theta) nY1 = minimum cartesian Y boundary value; nX1 = static_cast<int>((static_cast<MUpp32f>(deviceline.rho - (nAccumulatorsHeight >> 1)) - ((nY1 - nCenterY) * nSinTheta)) / nCosTheta + nCenterX); nY2 = maximum cartesian Y boundary value; nX2 = static_cast<int>((static_cast<MUpp32f>(deviceline.rho - (nAccumulatorsHeight >> 1)) - ((nY2 - nCenterY) * nSinTheta)) / nCosTheta + nCenterX); }


LabelMarkers

Generate image connected region label markers to be used for later image segmentation.

These functions have been deprecated. Use LabelMarkersUF functions instead.

LabelMarkersUFGetBufferSize

Before calling any of the LabelMarkersUF functions the application first needs to call the LabelMarkersGetBufferSize function to determine the amount of device memory to allocate as a working buffer. The application allocated device memory is then passed as the pBuffer parameter to the corresponding LabelMarkersUF function.

Function muppiLabelMarkersUFGetBufferSize_32u_C1R

![][public]

MUppStatus muppiLabelMarkersUFGetBufferSize_32u_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Calculate scratch buffer size needed 1 channel 32-bit unsigned integer LabelMarkersUF function based on destination image oSizeROI width and height.

Parameters:

  • oSizeROI: roi_specification.
  • hpBufferSize: Required buffer size in bytes.

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

LabelMarkersUF

Generate image connected region label markers to be used for later image segmentation.

A connected region is any pixel region where all pixels in the region have the same pixel value. Note that marker label IDs generally increase in value from image left to right and top to bottom they are not generated in any particular order and there may be numeric gaps between sequential marker IDs. To limit the number of marker IDs generated the application should pass the image through a threshold filter before calling this funcion. Doing so however does not necessarily limit the maximum marker ID value generated by this function. Note that these functions currently only support image ROI sizes up to 4 gigapixels. Also note that while these functions support destination image pitches that are not exactly equal to oSizeROI.width * sizeof(MUpp32u) it can avoid a musaMemCpyAsync() call to copy the final result from the working buffer to the destination image if the pitch exactly equals oSizeROI.width * sizeof(MUpp32u).

Before calling any of the LabelMarkersUF functions the application first needs to call the LabelMarkersUFGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding LabelMarkersUF function.

The algorithm used in this implementation is based on the one described in "An Optimized Union-Find Algorithm for Connected Components Labeling Using GPUs" by Jun Chen and others.

Note that the destination image in these functions must be allocated with musaMalloc() and NOT musaMallocPitch(). Also the pitch of the output image MUST be set to oSizeROI.width * sizeof(MUpp32u).

Function muppiLabelMarkersUF_8u32u_C1R_Ctx

![][public]

MUppStatus muppiLabelMarkersUF_8u32u_C1R_Ctx(MUpp8u *pSrc, int nSrcStep, MUpp32u *pDst, int nDstStep, MUppiSize oSizeROI, MUppiNorm eNorm, MUpp8u *pBuffer, MUppStreamContext muppStreamCtx)

1 channel 8-bit to 32-bit unsigned integer label markers image generation.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eNorm: Type of pixel connectivity test to use, muppiNormInf will use 8 way connectivity and muppiNormL1 will use 4 way connectivity.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding LabelMarkersUFGetBufferSize call.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

LabelMarkersUFBatchAdvanced

Generate image connected region label markers to be used for later image segmentation for a batched list of images.

A connected region is any pixel region where all pixels in the region have the same pixel value. Note that marker label IDs generally increase in value from image left to right and top to bottom they are not generated in any particular order and there may be numeric gaps between sequential marker IDs. To limit the number of marker IDs generated the application should pass the image through a threshold filter before calling this funcion. Doing so however does not necessarily limit the maximum marker ID value generated by this function. Note that these functions currently only support image ROI sizes up to 4 gigapixels. Also note that these functions work directly in the destination image so destination pitch MUST be equal to destination ROI.width

  • sizeof(MUpp32u) for each destination image in the list and even if the destination image pitch is greater than that of the output will be in that format. If this doesn't work for you use the single image version of these functions or musaMemCopy2D can be called for each output image to restore the original pitch. Note that all source and destination images in the batch list must contain enough device memory to contain their specified ROI size.

The algorithm used in this implementation is based on the one described in "An Optimized Union-Find Algorithm for Connected Components Labeling Using GPUs" by Jun Chen and others.

Note that the destination images in these functions must be allocated with musaMalloc() and NOT musaMallocPitch(). Also the pitch of the output image MUST be set to oSizeROI.width * sizeof(MUpp32u).

Function muppiLabelMarkersUFBatch_8u32u_C1R_Advanced_Ctx

![][public]

MUppStatus muppiLabelMarkersUFBatch_8u32u_C1R_Advanced_Ctx(const MUppiImageDescriptor *pSrcBatchList, MUppiImageDescriptor *pDstBatchList, int nBatchSize, MUppiSize oMaxSizeROI, MUppiNorm eNorm, MUppStreamContext muppStreamCtx)

1 channel 8-bit to 32-bit unsigned integer label markers image generation with per image destination ROI.

Parameters:

  • pSrcBatchList: source_batch_images_pointer device memory pointer to the list of device memory source image descriptors, oSize element is ignored.
  • pDstBatchList: destination_batch_images_pointer device memory pointer to the list of device memory destination image descriptors.
  • nBatchSize: Number of MUppiImageDescriptor structures processed in this call (must be > 1).
  • oMaxSizeROI: roi_specification maximum ROI width and height of ALL images in the batch.
  • eNorm: Type of pixel connectivity test to use, muppiNormInf will use 8 way connectivity and muppiNormL1 will use 4 way connectivity for all images in batch.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUppiImageDescriptor * pSrcBatchList
  • int nBatchSize

Return type: MUppStatus


FilterLaplace

Filters the image using a Laplacian filter kernel.

Common parameters for muppiFilterLaplace functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"12"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1 & -1 & -1 \\\\\n -1 & 8 & -1 \\\\\n -1 & -1 & -1 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n -1 & -3 & -4 & -3 & -1 \\\\\n -3 & 0 & 6 & 0 & -3 \\\\\n -4 & 6 & 20 & 6 & -4 \\\\\n -3 & 0 & 6 & 0 & -3 \\\\\n -1 & -3 & -4 & -3 & -1 \\\\\n \\end{array} \\right)\n\n \\]"}]}

Functions

Function muppiFilterLaplace_8u_C1R_Ctx

![][public]

MUppStatus muppiFilterLaplace_8u_C1R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Single channel 8-bit unsigned Laplace filter.

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

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_8u_C1R

![][public]

MUppStatus muppiFilterLaplace_8u_C1R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_8u_C3R_Ctx

![][public]

MUppStatus muppiFilterLaplace_8u_C3R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Three channel 8-bit unsigned Laplace filter.

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

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_8u_C3R

![][public]

MUppStatus muppiFilterLaplace_8u_C3R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_8u_C4R_Ctx

![][public]

MUppStatus muppiFilterLaplace_8u_C4R_Ctx(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Four channel 8-bit unsigned Laplace filter.

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

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_8u_C4R

![][public]

MUppStatus muppiFilterLaplace_8u_C4R(const MUpp8u *pSrc, MUpp32s nSrcStep, MUpp8u *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp8u * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C1R_Ctx

![][public]

MUppStatus muppiFilterLaplace_32f_C1R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Single channel 32-bit floating-point Laplace filter.

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

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C1R

![][public]

MUppStatus muppiFilterLaplace_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C3R_Ctx

![][public]

MUppStatus muppiFilterLaplace_32f_C3R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Three channel 32-bit floating-point Laplace filter.

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

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C3R

![][public]

MUppStatus muppiFilterLaplace_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C4R_Ctx

![][public]

MUppStatus muppiFilterLaplace_32f_C4R_Ctx(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize, MUppStreamContext muppStreamCtx)

Four channel 32-bit floating-point Laplace filter.

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

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterLaplace_32f_C4R

![][public]

MUppStatus muppiFilterLaplace_32f_C4R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiMaskSize eMaskSize)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus


FilterLaplaceBorder

Filters the image using a Laplacian filter kernel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterLaplaceBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"12"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1 & -1 & -1 \\\\\n -1 & 8 & -1 \\\\\n -1 & -1 & -1 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n -1 & -3 & -4 & -3 & -1 \\\\\n -3 & 0 & 6 & 0 & -3 \\\\\n -4 & 6 & 20 & 6 & -4 \\\\\n -3 & 0 & 6 & 0 & -3 \\\\\n -1 & -3 & -4 & -3 & -1 \\\\\n \\end{array} \\right)\n\n \\]"}]}


FilterLowPass

Filters the image using a low-pass filter kernel.

Common parameters for muppiFilterLowPass functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"17"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n 1/9 & 1/9 & 1/9 \\\\\n 1/9 & 1/9 & 1/9 \\\\\n 1/9 & 1/9 & 1/9 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n \\end{array} \\right)\n\\]"}]}


FilterLowPassBorder

Filters the image using a low-pass filter kernel with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterLowPassBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eMaskSize Enumeration value specifying the mask size.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"17"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n 1/9 & 1/9 & 1/9 \\\\\n 1/9 & 1/9 & 1/9 \\\\\n 1/9 & 1/9 & 1/9 \\\\\n \\end{array} \\right)\n \\left( \\begin{array}{rrrrr}\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n 1/25 & 1/25 & 1/25 & 1/25 & 1/25 \\\\\n \\end{array} \\right)\n\\]"}]}


FilterMax

Result pixel value is the maximum of pixel values under the rectangular mask region.

Common parameters for muppiFilterMax functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oMaskSize: Width and Height of the neighborhood region for the local Max operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterMaxBorder

Result pixel value is the maximum of pixel values under the rectangular mask region with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterMaxBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. oMaskSize Width and Height of the neighborhood region for the local Max operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterMedian

Result pixel value is the median of pixel values under the rectangular mask region.

Common parameters for muppiFilterMedian functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oMaskSize: Width and Height of the neighborhood region for the local Median operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • pBuffer: Pointer to the user-allocated scratch buffer required for the Median operation.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Common parameters for muppiFilterMedianGetBufferSize functions include:

Parameters:

  • oSizeROI: roi_specification.
  • oMaskSize: Width and Height of the neighborhood region for the local Median operation.
  • nBufferSize: Pointer to the size of the scratch buffer required for the Median operation.

Returns:

image_data_error_codes

Functions

Function muppiFilterMedian_32f_C1R

![][public]

MUppStatus muppiFilterMedian_32f_C1R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUpp8u *pBuffer)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterMedian_32f_C3R

![][public]

MUppStatus muppiFilterMedian_32f_C3R(const MUpp32f *pSrc, MUpp32s nSrcStep, MUpp32f *pDst, MUpp32s nDstStep, MUppiSize oSizeROI, MUppiSize oMaskSize, MUppiPoint oAnchor, MUpp8u *pBuffer)

Parameters:

  • const MUpp32f * pSrc

Return type: MUppStatus

Function muppiFilterMedianGetBufferSize_32f_C1R

![][public]

MUppStatus muppiFilterMedianGetBufferSize_32f_C1R(MUppiSize oSizeROI, MUppiSize oMaskSize, MUpp32u *nBufferSize)

Parameters:

Return type: MUppStatus

Function muppiFilterMedianGetBufferSize_32f_C3R

![][public]

MUppStatus muppiFilterMedianGetBufferSize_32f_C3R(MUppiSize oSizeROI, MUppiSize oMaskSize, MUpp32u *nBufferSize)

Parameters:

Return type: MUppStatus


FilterMin

Result pixel value is the minimum of pixel values under the rectangular mask region.

Common parameters for muppiFilterMin functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oMaskSize: Width and Height of the neighborhood region for the local Min operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterMinBorder

Result pixel value is the minimum of pixel values under the rectangular mask region with border control.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterMinBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. oMaskSize Width and Height of the neighborhood region for the local Min operation.
  • oAnchor: X and Y offsets of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterPrewitt

Filters the image using a Prewitt filter kernel.

Common parameters for muppiFilterPrewitt functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterPrewittBorder

Filters the image using a Prewitt filter kernel with border control.

Common parameters for muppiFilterPrewittBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eBorderType The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRoberts

Filters the image using a Roberts filter kernel.

Common parameters for muppiFilterRoberts functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRobertsBorder

Filters the image using a Roberts filter kernel with border control.

Common parameters for muppiFilterRobertsBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eBorderType The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRow

Apply convolution filter with user specified 1D row of weights.

Result pixel is equal to the sum of the products between the kernel coefficients (pKernel array) and corresponding neighboring row pixel values in the source image defined by nKernelDim and nAnchorX, divided by nDivisor.

Common parameters for muppiFilterRow functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coefficients are expected to be stored in reverse order.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRow32f

FilterRow using floating-point weights.

Common parameters for muppiFilterRow32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oROI: roi_specification.
  • pKernel: Pointer to the start address of the kernel coefficient array. Coefficients are expected to be stored in reverse order.
  • nMaskSize: Length of the linear kernel array.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRowBorder

General purpose 1D convolution row filter with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. Before writing the result pixel the sum is scaled back via division by nDivisor. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterRowBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • nMaskSize: Width of the kernel.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • nDivisor: The factor by which the convolved summation from the Filter operation should be divided. If equal to the sum of coefficients, this will keep the maximum result value within full scale.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterRowBorder32f

General purpose 1D row convolution filter using floating-point weights with border control.

Pixels under the mask are multiplied by the respective weights in the mask and the results are summed. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterRowBorder32f functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. pKernel Pointer to the start address of the kernel coefficient array. Coeffcients are expected to be stored in reverse order.
  • nMaskSize: Width of the kernel.
  • nAnchor: X offset of the kernel origin frame of reference relative to the source pixel.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterScharr

Filters the image using a Scharr filter kernel.

Common parameters for muppiFilterScharr functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterScharrBorder

Filters the image using a Scharr filter kernel with border control.

Common parameters for muppiFilterScharrBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eBorderType The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterSharpen

Filters the image using a sharpening filter kernel:

Common parameters for muppiFilterSharpen functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"18"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1/8 & -1/8 & -1/8 \\\\\n -1/8 & 16/8 & -1/8 \\\\\n -1/8 & -1/8 & -1/8 \\\\\n \\end{array} \\right)\n\\]"}]}


FilterSharpenBorder

Filters the image using a sharpening filter kernel with border control.

If any portion of the 3x3 mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterSharpenBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eBorderType The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

formula {"type":"element","name":"formula","attributes":{"id":"18"},"children":[{"type":"text","text":"\\[\n \\left( \\begin{array}{rrr}\n -1/8 & -1/8 & -1/8 \\\\\n -1/8 & 16/8 & -1/8 \\\\\n -1/8 & -1/8 & -1/8 \\\\\n \\end{array} \\right)\n\\]"}]}


FilterSobel

Filters the image using a Sobel filter kernel.

Common parameters for muppiFilterSobel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • eMaskSize: Enumeration value specifying the mask size.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterSobelBorder

Filters the image using a Sobel filter kernel with border control.

Common parameters for muppiFilterSobelBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. eMaskSize Enumeration value specifying the mask size.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Image_filter_threshold_adaptive_box_border

FilterThresholdAdaptiveBoxBorder

Computes the average pixel values of the pixels under a square mask with border control. If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. Once the neighborhood average around a source pixel is determined the souce pixel is compared to the average - nDelta and if the source pixel is greater than that average the corresponding destination pixel is set to nValGT, otherwise nValLE.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. oMaskSize Width and Height of the neighborhood region for the local Avg operation, Width and Height must be equal and odd.
  • nDelta: Neighborhood average adjustment value
  • nValGT: Destination output value if source pixel is greater than average.
  • nValLE: Destination output value if source pixel is less than or equal to average.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


FilterUnsharpBorder

Filters the image using a unsharp-mask sharpening filter kernel with border control.

The algorithm involves the following steps: Smooth the original image with a Gaussian filter, with the width controlled by the nRadius. Subtract the smoothed image from the original to create a high-pass filtered image. Apply any clipping needed on the high-pass image, as controlled by the nThreshold. Add a certain percentage of the high-pass filtered image to the original image, with the percentage controlled by the nWeight. In pseudocode this algorithm can be written as: HighPass = Image - Gaussian(Image) Result = Image + nWeight * HighPass * ( |HighPass| >= nThreshold ) where nWeight is the amount, nThreshold is the threshold, and >= indicates a Boolean operation, 1 if true, or 0 otherwise.

If any portion of the mask overlaps the source image boundary, the requested border type operation is applied to all mask pixels which fall outside of the source image.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterUnsharpBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. nRadius The radius of the Gaussian filter, in pixles, not counting the center pixel.
  • nSigma: The standard deviation of the Gaussian filter, in pixel.
  • nWeight: The percentage of the difference between the original and the high pass image that is added back into the original.
  • nThreshold: The threshold neede to apply the difference amount.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • pDeviceBuffer: Pointer to the user-allocated device scratch buffer required for the unsharp operation.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Common parameters for muppiFilterUnsharpGetBufferSize functions include:

Parameters:

  • nRadius: The radius of the Gaussian filter, in pixles, not counting the center pixel.
  • nSigma: The standard deviation of the Gaussian filter, in pixel.
  • hpBufferSize: Pointer to the size of the scratch buffer required for the unsharp operation.

Returns:

image_data_error_codes


WatershedSegmentation

Segments a grayscale image using the watershed segmentation technique described in "Efficient 2D and 3D Watershed on Graphics Processing Unit: Block-Asynchronous Approaches Based on Cellular Automata" by Pablo Quesada-Barriuso and others.

SegmentWatershedGetBufferSize

Before calling any of the SegmentWatershed functions the application first needs to call the corresponding SegmentWatershedGetBufferSize function to determine the amount of device memory to allocate as a working buffer. The application allocated device memory is then passed as the pBuffer parameter to the corresponding SegmentWatershed function.

Function muppiSegmentWatershedGetBufferSize_8u_C1R

![][public]

MUppStatus muppiSegmentWatershedGetBufferSize_8u_C1R(MUppiSize oSizeROI, size_t *hpDeviceMemoryBufferSize)

Calculate scratch buffer sizes needed for 1 channel 8-bit unsigned integer watershed segmentation function based on destination image oSizeROI width and height.

Parameters:

  • oSizeROI: roi_specification.
  • hpDeviceMemoryBufferSize: Required device memory buffer size in bytes.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • size_t * hpDeviceMemoryBufferSize

Return type: MUppStatus

SegmentWatershed

Generate an output image containing regions of constant value grayscale defined by watershed segmentation plateau boundaries from a grayscale input image. Optionally output the corresponding marker labels image.

Before calling any of the SegmentWatershed functions the application first needs to call the corresponding SegmentWatershedGetBufferSize to determine the amount of device memory to allocate as working buffers. The allocatd memory is then passed as the pDeviceMemoryBuffer parameter to the corresponding SegmentWatershed function.

Function muppiSegmentWatershed_8u_C1IR_Ctx

![][public]

MUppStatus muppiSegmentWatershed_8u_C1IR_Ctx(MUpp8u *pSrcDst, MUpp32s nSrcDstStep, MUpp32u *pMarkerLabels, MUpp32s nMarkerLabelsStep, MUppiNorm eNorm, MUppiWatershedSegmentBoundaryType eSegmentBoundaryType, MUppiSize oSizeROI, MUpp8u *pDeviceMemoryBuffer, MUppStreamContext muppStreamCtx)

1 channel 8-bit unsigned integer in place image watershed segmentation generation.

Parameters:

  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: source_image_line_step.
  • pMarkerLabels: Device memory pointer to optionally output the corresponding marker labels image, set to NULL if no maker labels image output is desired.
  • nMarkerLabelsStep: Maker labels image line step,ignored if pMarkerLabels is NULL.
  • eNorm: Type of pixel connectivity test to use, muppiNormInf will use 8 way connectivity and muppiNormL1 will use 4 way connectivity.
  • eSegmentBoundaryType: Type of segment boundaries, if any, to be added to output image.
  • oSizeROI: roi_specification for both segmented image and corresponding marker labels image.
  • pDeviceMemoryBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponging SegmentWatershedGetBufferSize call.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

Return type: MUppStatus


FilterWienerBorder

Noise removal filtering of an image using an adaptive Wiener filter with border control.

Pixels under the source mask are used to generate statistics about the local neighborhood which are then used to control the amount of adaptive noise filtering locally applied.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiFilterWienerBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: The pixel offset that pSrc points to relative to the origin of the source image.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. oMaskSize Pixel Width and Height of the rectangular region of interest surrounding the source pixel.
  • oAnchor: Positive X and Y relative offsets of primary pixel in region of interest surrounding the source pixel relative to bottom right of oMaskSize.
  • aNoise: Fixed size array of per-channel noise variance level value in range of 0.0F to 1.0F.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

For each pixel in the source image the function estimates the local mean and variance in the neighborhood defined by oMaskSize relative to the primary source pixel located at oAnchor.x and oAnchor.y. Given an oMaskSize with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the mean, variance, and destination pixel value will be computed per channel as formula {"type":"element","name":"formula","attributes":{"id":"21"},"children":[{"type":"text","text":"\\[Mean = \\frac{1}{W\\cdot\nH}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}pSrc(j,i)\\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"22"},"children":[{"type":"text","text":"\\[Variance^2 =\n\\frac{1}{W\\cdot H}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}(pSrc(j,i)^2-Mean^2)\\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"23"},"children":[{"type":"text","text":"\\[pDst(j,i) = Mean+\\frac{(Variance^2-NoiseVariance)}{Variance^2}\\cdot\n{(pSrc(j,i)-Mean)}\\]"}]}


Filtering Functions

Linear and non-linear image filtering functions.

Filtering functions are classified as neighborhood_operations. It is the user's responsibility to avoid sampling_beyond_image_boundaries.

These functions can be found in the muppif library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


Fourier Transforms

The set of Fourier transform functions available in the library.

Functions

Function muppiMagnitude_32fc32f_C1R_Ctx

![][public]

MUppStatus muppiMagnitude_32fc32f_C1R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

32-bit floating point complex to 32-bit floating point magnitude.

Converts complex-number pixel image to single channel image computing the result pixels as the magnitude of the complex values. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMagnitude_32fc32f_C1R

![][public]

MUppStatus muppiMagnitude_32fc32f_C1R(const MUpp32fc *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMagnitudeSqr_32fc32f_C1R_Ctx

![][public]

MUppStatus muppiMagnitudeSqr_32fc32f_C1R_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

32-bit floating point complex to 32-bit floating point squared magnitude.

Converts complex-number pixel image to single channel image computing the result pixels as the squared magnitude of the complex values.

The squared magnitude is an itermediate result of magnitude computation and can thus be computed faster than actual magnitude. If magnitudes are required for sorting/comparing only, using this function instead of muppiMagnitude_32fc32f_C1R can be a worthwhile performance optimization.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMagnitudeSqr_32fc32f_C1R

![][public]

MUppStatus muppiMagnitudeSqr_32fc32f_C1R(const MUpp32fc *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Geometry Transforms

Routines manipulating an image geometry.

These functions can be found in the muppig library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Geometric Transform API Specifics

This section covers some of the unique API features common to the geometric transform primitives.

Geometric Transforms and ROIs

Geometric transforms operate on source and destination ROIs. The way these ROIs affect the processing of pixels differs from other (non geometric) image-processing primitives: Only pixels in the intersection of the destination ROI and the transformed source ROI are being processed.

The typical processing proceedes as follows:

  1. Transform the rectangular source ROI (given in source image coordinates) into the destination image space. This yields a quadrilateral.

  2. Write only pixels in the intersection of the transformed source ROI and the destination ROI.

Pixel Interpolation

The majority of image geometry transform operation need to perform a resampling of the source image as source and destination pixels are not coincident.

MUPP supports the following pixel inerpolation modes (in order from fastest to slowest and lowest to highest quality):

  • nearest neighbor

  • linear interpolation

  • cubic convolution

  • supersampling

  • interpolation using Lanczos window function

Submodules


HistogramEven

Primitives for computing the histogram of an image with evenly distributed bins.

HistogramEven

The histogram is computed according to the ranges provided in formula {"type":"element","name":"formula","attributes":{"id":"80"},"children":[{"type":"text","text":"$pLevels$"}]}. The histogram formula {"type":"element","name":"formula","attributes":{"id":"78"},"children":[{"type":"text","text":"$pHist[k]$"}]} is defined as the total number of pixels that fall into the range: formula {"type":"element","name":"formula","attributes":{"id":"81"},"children":[{"type":"text","text":"$pLevels[k] <= pSrc(j, i) < pLevels[k+1]$"}]}. The number of the histogram bins is formula {"type":"element","name":"formula","attributes":{"id":"74"},"children":[{"type":"text","text":"$nLevel - 1$"}]}. The functions require additional scratch buffer for computations. ### ,Common parameters for muppiHistogramEven functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSizeROI: roi_specification.
  • pHist: Pointer to array that receives the computed histogram. The array must be of size nLevels-1.
  • pLevels: Pointer to array containing the level sizes of the bins. The array must be of size nLevels.
  • nLevels: Number of levels in histogram.
  • pBuffer: Pointer to appropriately sized (muppiHistogramRangeGetBufferSize_XX_XXX) scratch buffer.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Function muppiEvenLevelsHost_32s

![][public]

MUppStatus muppiEvenLevelsHost_32s(MUpp32s *hpLevels, int nLevels, MUpp32s nLowerLevel, MUpp32s nUpperLevel)

Parameters:

  • int nLevels

Return type: MUppStatus

Function muppiHistogramEven_8u_C1R

![][public]

MUppStatus muppiHistogramEven_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp32s *pHist, int nLevels, MUpp32s nLowerLevel, MUpp32s nUpperLevel, MUpp8u *pBuffer)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nLevels

Return type: MUppStatus

HistogramEvenGetBufferSize

Companion primitives for computing the device buffer size (in bytes) required by the HistogramEven primitives. ### ,Common parameters for muppiHistogramEvenGetBufferSize functions include:

Parameters:

  • oSizeROI: roi_specification. nLevels Number of levels in the histogram.
  • hpBufferSize: Required buffer size. Important: hpBufferSize is a host pointer. general_scratch_buffer.

Returns:

MUPP_NULL_POINTER_ERROR if hpBufferSize is 0 (NULL), roi_error_codes..

Function muppiHistogramEvenGetBufferSize_8u_C1R

![][public]

MUppStatus muppiHistogramEvenGetBufferSize_8u_C1R(MUppiSize oSizeROI, int nLevels, size_t *hpBufferSize)

Parameters:

  • int nLevels
  • size_t * hpBufferSize

Return type: MUppStatus


HistogramRange

Primitives for computing the histogram of an image within specified ranges.


Norm_Inf

Primitives for computing the infinity norm of an image.

Basic Norm_Inf

Function muppiNorm_Inf_32f_C1R

![][public]

MUppStatus muppiNorm_Inf_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f *pNorm, MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiNorm_Inf_32f_C3R

![][public]

MUppStatus muppiNorm_Inf_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp64f aNorm[3], MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

Return type: MUppStatus

NormInfGetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the Norm_Inf primitives.

Function muppiNormInfGetBufferHostSize_32f_C1R

![][public]

MUppStatus muppiNormInfGetBufferHostSize_32f_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiNormInfGetBufferHostSize_32f_C3R

![][public]

MUppStatus muppiNormInfGetBufferHostSize_32f_C3R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus


NormDiff_Inf

Primitives for computing the infinity norm of difference of pixels between two images.


NormRel_Inf

Primitives for computing the relative error of infinity norm between two images.


Insert Channel Copy

The channel insert primitives copy a single-channel source image into one of the color channels in a multi-channel destination image. The channel is selected by adjusting the destination image pointer to point to the desired color channel (see channel_of_interest).

Common parameters for muppiCopy_C1CX functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: select_destination_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Integral

Primitives for computing the integral image of a given image.


Linear Transforms

Linear image transformations.

These functions can be found in the muppist library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


Ln

Pixel by pixel natural logarithm of each pixel in an image.


Logical Operations

The set of image processing logical operations available in the library.

Submodules


LShiftC

Pixel by pixel left shift of an image by a constant value.

Functions

Function muppiLShiftC_8u_C1R

![][public]

MUppStatus muppiLShiftC_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_8u_C3R

![][public]

MUppStatus muppiLShiftC_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_8u_C4R

![][public]

MUppStatus muppiLShiftC_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_16u_C1R

![][public]

MUppStatus muppiLShiftC_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_16u_C3R

![][public]

MUppStatus muppiLShiftC_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_16u_C4R

![][public]

MUppStatus muppiLShiftC_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_32s_C1R

![][public]

MUppStatus muppiLShiftC_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_32s_C3R

![][public]

MUppStatus muppiLShiftC_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiLShiftC_32s_C4R

![][public]

MUppStatus muppiLShiftC_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus


Masked Copy

The masked copy primitives have an additional "mask image" input. The mask controls which pixels within the ROI are copied. For details see masked_operation.

Common parameters for muppiCopy_CXM functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • pMask: mask_image_pointer.
  • nMaskStep: mask_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Masked Set

The masked set primitives have an additional "mask image" input. The mask controls which pixels within the ROI are set. For details see masked_operation.

Common parameters for muppiSet_CXM functions include:

Parameters:

  • nValue: The pixel value to be set for single channel functions.
  • aValue: The pixel-value to be set for multi-channel functions.
  • pDst: Pointer destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: mask_image_pointer.
  • nMaskStep: mask_image_line_step.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiSet_32f_C1MR

![][public]

MUppStatus muppiSet_32f_C1MR(MUpp32f nValue, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, int nMaskStep)

Parameters:

  • int nDstStep
  • const MUpp8u * pMask
  • int nMaskStep

Return type: MUppStatus

Function muppiSet_32f_C3MR

![][public]

MUppStatus muppiSet_32f_C3MR(const MUpp32f aValue[3], MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp8u *pMask, int nMaskStep)

Parameters:

  • const MUpp32f aValue
  • int nDstStep
  • const MUpp8u * pMask
  • int nMaskStep

Return type: MUppStatus


Max

Primitives for computing the maximal pixel value of an image.

Common parameters for muppiMax functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSizeROI: roi_specification.
  • pDeviceBuffer: Pointer to the required device memory allocation, general_scratch_buffer. Use muppiMaxGetBufferHostSize_XX_XXX to determine the minium number of bytes required.
  • pMax: Pointer to the computed max.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MaxIndx

Primitives for computing the maximal value and its indices (X and Y coordinates) of an image.


MaxEvery

Primitives for computing the maximal value of the pixel pair from two images.


MaximumError

Primitives for computing the maximum error between two images. Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the maximum error is defined as the largest absolute difference between pixels of two images. If the image is in complex format, the absolute value of the complex number is provided. ### ,Common parameters for muppiMaximumError functions include:

Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. pSrc2 source_image_pointer. nSrc2Step source_image_line_step. oSizeROI roi_specification. pError Pointer to the computed error.
  • pDeviceBuffer: Pointer to the required device memory allocation, general_scratch_buffer. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


MaximumRelativeError

Primitives for computing the maximum relative error between two images. Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the maximum relative error is defined as: formula {"type":"element","name":"formula","attributes":{"id":"120"},"children":[{"type":"text","text":"\\[MaximumRelativeError = max{\\frac{\\left|pSrc1(j,i) -\npSrc2(j,i)\\right|}{max(\\left|pSrc1(j,i)\\right|, \\left|pSrc2(j,i)\\right|)}}\\]"}]} If the image is in complex format, the absolute value is used for computation. For multiple channles, the maximum relative error of all the channles is returned.


Mean

Primitives for computing the arithmetic mean of all the pixel values in an image.


Mean_StdDev

Primitives for computing both the arithmetic mean and the standard deviation of an image.

Mean_StdDev

Given an image formula {"type":"element","name":"formula","attributes":{"id":"42"},"children":[{"type":"text","text":"$pSrc$"}]} with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]}, the mean and the standard deviation will be computed as formula {"type":"element","name":"formula","attributes":{"id":"21"},"children":[{"type":"text","text":"\\[Mean = \\frac{1}{W\\cdot\nH}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}pSrc(j,i)\\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"44"},"children":[{"type":"text","text":"\\[StdDev =\n\\sqrt{\\frac{1}{W\\cdot\nH}\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}(pSrc(j,i)-Mean)^2}\\]"}]} The Mean_StdDev primitives require additional scratch buffer for computations.

Common parameters for muppiMean_StdDev functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: mask_image_pointer.
  • nMaskStep: mask_image_line_step.
  • nCOI: channel_of_interest_number.
  • pDeviceBuffer: Pointer to the required device memory allocation, general_scratch_buffer Use muppiMeanStdDevGetBufferHostSize_8u_C1R to determine the minium number of bytes required.
  • pMean: Pointer to the computed mean.
  • pStdDev: Pointer to the computed standard deviation.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, or MUPP_COI_ERROR if an invalid channel of interest is specified.

Function muppiMean_StdDev_8u_C1R

![][public]

MUppStatus muppiMean_StdDev_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp8u *pDeviceBuffer, MUpp64f *pMean, MUpp64f *pStdDev)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiMean_StdDev_32f_C1R

![][public]

MUppStatus muppiMean_StdDev_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp8u *pDeviceBuffer, MUpp64f *pMean, MUpp64f *pStdDev)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiMean_StdDev_8u_C1MR

![][public]

MUppStatus muppiMean_StdDev_8u_C1MR(const MUpp8u *pSrc, int nSrcStep, const MUpp8u *pMask, int nMaskStep, MUppiSize oSizeROI, MUpp8u *pDeviceBuffer, MUpp64f *pMean, MUpp64f *pStdDev)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • const MUpp8u * pMask
  • int nMaskStep

Return type: MUppStatus

Function muppiMean_StdDev_32f_C1MR

![][public]

MUppStatus muppiMean_StdDev_32f_C1MR(const MUpp32f *pSrc, int nSrcStep, const MUpp8u *pMask, int nMaskStep, MUppiSize oSizeROI, MUpp8u *pDeviceBuffer, MUpp64f *pMean, MUpp64f *pStdDev)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp8u * pMask
  • int nMaskStep

Return type: MUppStatus

MeanStdDevGetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the Mean_StdDev primitives.

Function muppiMeanStdDevGetBufferHostSize_8u_C1R

![][public]

MUppStatus muppiMeanStdDevGetBufferHostSize_8u_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiMeanStdDevGetBufferHostSize_32f_C1R

![][public]

MUppStatus muppiMeanStdDevGetBufferHostSize_32f_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiMeanStdDevGetBufferHostSize_8u_C1MR

![][public]

MUppStatus muppiMeanStdDevGetBufferHostSize_8u_C1MR(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiMeanStdDevGetBufferHostSize_32f_C1MR

![][public]

MUppStatus muppiMeanStdDevGetBufferHostSize_32f_C1MR(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus


Memory Management

Routines for allocating and deallocating pitched image storage. These methods are provided for convenience. They allocate memory that may contain additional padding bytes at the end of each line of pixels. Though padding is not necessary for any of the MUPP image-processing primitives to work correctly, its absense may cause sever performance degradation compared to properly padded images.

These functions can be found in the muppisu library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Image Memory Allocation

ImageAllocator methods for 2D arrays of data. The allocators have width and height parameters to specify the size of the image data being allocated. They return a pointer to the newly created memory and return the numbers of bytes between successive lines.

If the memory allocation failed due to lack of free device memory or device memory fragmentation the routine returns 0.

All allocators return memory with line strides that are beneficial for performance. It is not mandatory to use these allocators. Any valid MUSA device-memory pointers can be used by the MUPP primitives and there are no restrictions on line strides.

Function muppiMalloc_8u_C1

![][public]

MUpp8u * muppiMalloc_8u_C1(int nWidthPixels, int nHeightPixels, int *pStepBytes)

8-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp8u *

Function muppiMalloc_8u_C2

![][public]

MUpp8u * muppiMalloc_8u_C2(int nWidthPixels, int nHeightPixels, int *pStepBytes)

2 channel 8-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp8u *

Function muppiMalloc_8u_C3

![][public]

MUpp8u * muppiMalloc_8u_C3(int nWidthPixels, int nHeightPixels, int *pStepBytes)

3 channel 8-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp8u *

Function muppiMalloc_8u_C4

![][public]

MUpp8u * muppiMalloc_8u_C4(int nWidthPixels, int nHeightPixels, int *pStepBytes)

4 channel 8-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp8u *

Function muppiMalloc_16u_C1

![][public]

MUpp16u * muppiMalloc_16u_C1(int nWidthPixels, int nHeightPixels, int *pStepBytes)

16-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16u *

Function muppiMalloc_16u_C2

![][public]

MUpp16u * muppiMalloc_16u_C2(int nWidthPixels, int nHeightPixels, int *pStepBytes)

2 channel 16-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16u *

Function muppiMalloc_16u_C3

![][public]

MUpp16u * muppiMalloc_16u_C3(int nWidthPixels, int nHeightPixels, int *pStepBytes)

3 channel 16-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16u *

Function muppiMalloc_16u_C4

![][public]

MUpp16u * muppiMalloc_16u_C4(int nWidthPixels, int nHeightPixels, int *pStepBytes)

4 channel 16-bit unsigned image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16u *

Function muppiMalloc_16s_C1

![][public]

MUpp16s * muppiMalloc_16s_C1(int nWidthPixels, int nHeightPixels, int *pStepBytes)

16-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16s *

Function muppiMalloc_16s_C2

![][public]

MUpp16s * muppiMalloc_16s_C2(int nWidthPixels, int nHeightPixels, int *pStepBytes)

2 channel 16-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16s *

Function muppiMalloc_16s_C4

![][public]

MUpp16s * muppiMalloc_16s_C4(int nWidthPixels, int nHeightPixels, int *pStepBytes)

4 channel 16-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp16s *

Function muppiMalloc_32s_C1

![][public]

MUpp32s * muppiMalloc_32s_C1(int nWidthPixels, int nHeightPixels, int *pStepBytes)

32-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32s *

Function muppiMalloc_32s_C3

![][public]

MUpp32s * muppiMalloc_32s_C3(int nWidthPixels, int nHeightPixels, int *pStepBytes)

3 channel 32-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32s *

Function muppiMalloc_32s_C4

![][public]

MUpp32s * muppiMalloc_32s_C4(int nWidthPixels, int nHeightPixels, int *pStepBytes)

4 channel 32-bit signed image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32s *

Function muppiMalloc_32f_C1

![][public]

MUpp32f * muppiMalloc_32f_C1(int nWidthPixels, int nHeightPixels, int *pStepBytes)

32-bit floating point image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32f *

Function muppiMalloc_32f_C2

![][public]

MUpp32f * muppiMalloc_32f_C2(int nWidthPixels, int nHeightPixels, int *pStepBytes)

2 channel 32-bit floating point image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32f *

Function muppiMalloc_32f_C3

![][public]

MUpp32f * muppiMalloc_32f_C3(int nWidthPixels, int nHeightPixels, int *pStepBytes)

3 channel 32-bit floating point image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32f *

Function muppiMalloc_32f_C4

![][public]

MUpp32f * muppiMalloc_32f_C4(int nWidthPixels, int nHeightPixels, int *pStepBytes)

4 channel 32-bit floating point image memory allocator. Parameters:

  • nWidthPixels: Image width.
  • nHeightPixels: Image height.
  • pStepBytes: line_step.

Returns:

Pointer to new image data.

Parameters:

  • int nWidthPixels
  • int nHeightPixels
  • int * pStepBytes

Return type: MUpp32f *

Functions

Function muppiFree

![][public]

void muppiFree(void *pData)

Free method for any 2D allocated memory. This method should be used to free memory allocated with any of the muppiMalloc_<modifier> methods. Parameters:

  • pData: A pointer to memory allocated using muppiMalloc_<modifier>.

Parameters:

  • void * pData

Return type: void


Min

Primitives for computing the minimal pixel value of an image.


MinIndx

Primitives for computing the minimal value and its indices (X and Y coordinates) of an image.


MinMax

Primitives for computing both the minimal and the maximal values of an image.

MinMax

The functions require the device scratch buffer.

Common parameters for muppiMinMax functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSizeROI: roi_specification.
  • pMin: Pointer to the computed minimal result.
  • pMax: Pointer to the computed maximal result.
  • pDeviceBuffer: Buffer to a scratch memory. Use muppiMinMax_XX_XXX to determine the minium number of bytes required.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Function muppiMinMax_32f_C1R

![][public]

MUppStatus muppiMinMax_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp32f *pMin, MUpp32f *pMax, MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep

Return type: MUppStatus

Function muppiMinMax_32f_C3R

![][public]

MUppStatus muppiMinMax_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp32f aMin[3], MUpp32f aMax[3], MUpp8u *pDeviceBuffer)

Parameters:

  • const MUpp32f * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} --> TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

Return type: MUppStatus

MinMaxGetBufferHostSize

Companion primitives for computing the device buffer size (in bytes) required by the MinMax primitives.

Function muppiMinMaxGetBufferHostSize_32f_C1R

![][public]

MUppStatus muppiMinMaxGetBufferHostSize_32f_C1R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus

Function muppiMinMaxGetBufferHostSize_32f_C3R

![][public]

MUppStatus muppiMinMaxGetBufferHostSize_32f_C3R(MUppiSize oSizeROI, int *hpBufferSize)

Parameters:

  • int * hpBufferSize

Return type: MUppStatus


MinMaxIndx

Primitives for computing the minimal and the maximal values with their indices (X and Y coordinates) of an image.


MinEvery

Primitives for computing the minimal value of the pixel pair from two images.


Mirror

Mirrors images horizontally, vertically or diagonally.

Mirror Error Codes

Common parameters for muppiMirror non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oROI: roi_specification (in_place ROI widths and heights must be even numbers).
  • flip: Specifies the axis about which the image is to be mirrored.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Mirror Error Codes

Functions

Function muppiMirror_8u_C1R

![][public]

MUppStatus muppiMirror_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_8u_C1IR

![][public]

MUppStatus muppiMirror_8u_C1IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_8u_C3R

![][public]

MUppStatus muppiMirror_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_8u_C3IR

![][public]

MUppStatus muppiMirror_8u_C3IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_8u_C4R

![][public]

MUppStatus muppiMirror_8u_C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_8u_C4IR

![][public]

MUppStatus muppiMirror_8u_C4IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_16u_C1R

![][public]

MUppStatus muppiMirror_16u_C1R(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_16u_C1IR

![][public]

MUppStatus muppiMirror_16u_C1IR(MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_16u_C3R

![][public]

MUppStatus muppiMirror_16u_C3R(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_16u_C3IR

![][public]

MUppStatus muppiMirror_16u_C3IR(MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_16u_C4R

![][public]

MUppStatus muppiMirror_16u_C4R(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_16u_C4IR

![][public]

MUppStatus muppiMirror_16u_C4IR(MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32s_C1R

![][public]

MUppStatus muppiMirror_32s_C1R(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32s_C1IR

![][public]

MUppStatus muppiMirror_32s_C1IR(MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32s_C3R

![][public]

MUppStatus muppiMirror_32s_C3R(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32s_C3IR

![][public]

MUppStatus muppiMirror_32s_C3IR(MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32s_C4R

![][public]

MUppStatus muppiMirror_32s_C4R(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32s_C4IR

![][public]

MUppStatus muppiMirror_32s_C4IR(MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32f_C1R

![][public]

MUppStatus muppiMirror_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32f_C1IR

![][public]

MUppStatus muppiMirror_32f_C1IR(MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32f_C3R

![][public]

MUppStatus muppiMirror_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32f_C3IR

![][public]

MUppStatus muppiMirror_32f_C3IR(MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiMirror_32f_C4R

![][public]

MUppStatus muppiMirror_32f_C4R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiMirror_32f_C4IR

![][public]

MUppStatus muppiMirror_32f_C4IR(MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oROI, MUppiAxis flip)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus


ComplexImageMorphology

Complex image morphological operations.

Submodules


MorphBlackHatBorder

Morphological close pixel result minus source pixel with border control.

Morphological black hat computes the output pixel as the morphological close pixel value of the pixels under the mask minus the source pixel value. Pixels who's corresponding mask values are zero do not participate in the maximum or minimum search.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. The mask is centered over the source image pixel being tested.

Before calling any of the MorphBlackHatBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding MorphBlackHatBorder function.

Use the oSrcOffset and oSrcSize parameters to control where the border control operation is applied to the source image ROI borders.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiMorphBlackHatBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding MorphGetBufferSize call.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MorphCloseBorder

Dilation followed by Erosion with border control.

Morphological close computes the output pixel as the maximum pixel value of the pixels under the mask followed by a second pass using the result of the first pass as input which outputs the minimum pixel value of the pixels under the same mask. Pixels who's corresponding mask values are zero do not participate in the maximum or minimum search.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. The mask is centered over the source image pixel being tested.

Before calling any of the MorphCloseBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding MorphCloseBorder function.

Use the oSrcOffset and oSrcSize parameters to control where the border control operation is applied to the source image ROI borders.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiMorphCloseBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding MorphGetBufferSize call.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MorphGetBufferSize

Before calling any of the MorphCloseBorder, MorphOpenBorder, MorphTopHatBorder, MorphBlackHatBorder, or MorphGradientBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The application allocated device memory is then passed as the pBuffer parameter to the corresponding MorphXXXBorder function.

Common parameters for muppiMorphGetBufferSize functions include:

Parameters:

  • oSizeROI: roi_specification.
  • hpBufferSize: Required buffer size in bytes.

MorphGradientBorder

Morphological dilated pixel result minus morphological eroded pixel result with border control.

Morphological gradient computes the output pixel as the morphological dilated pixel value of the pixels under the mask minus the morphological eroded pixel value of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the maximum or minimum search.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. The mask is centered over the source image pixel being tested.

Before calling any of the MorphGradientBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding MorphGradientBorder function.

Use the oSrcOffset and oSrcSize parameters to control where the border control operation is applied to the source image ROI borders.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiMorphGradientBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding MorphGetBufferSize call.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MorphOpenBorder

Erosion followed by Dilation with border control.

Morphological open computes the output pixel as the minimum pixel value of the pixels under the mask followed by a second pass using the result of the first pass as input which outputs the maximum pixel value of the pixels under the same mask. Pixels who's corresponding mask values are zero do not participate in the minimum or maximum search.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. The mask is centered over the source image pixel being tested.

Before calling any of the MorphOpenBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding MorphOpenBorder function.

Use the oSrcOffset and oSrcSize parameters to control where the border control operation is applied to the source image ROI borders.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiMorphOpenBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding MorphGetBufferSize call.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


MorphToHatBorder

Source pixel minus the morphological open pixel result with border control.

Morphological top hat computes the output pixel as the source pixel minus the morphological open result of the pixels under the mask. Pixels who's corresponding mask values are zero do not participate in the maximum or minimum search.

If any portion of the mask overlaps the source image boundary the requested border type operation is applied to all mask pixels which fall outside of the source image. The mask is centered over the source image pixel being tested.

Before calling any of the MorphTopHatBorder functions the application first needs to call the corresponding MorphGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding MorphTopHatBorder function.

Use the oSrcOffset and oSrcSize parameters to control where the border control operation is applied to the source image ROI borders.

Currently only the MUPP_BORDER_REPLICATE border type operation is supported.

Common parameters for muppiMorphTopHatBorder functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Source image width and height in pixels relative to pSrc.
  • oSrcOffset: Source image starting point relative to pSrc.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • pMask: Pointer to the start address of the mask array
  • oMaskSize: Width and Height mask array.
  • oAnchor: X and Y offsets of the mask origin frame of reference w.r.t the source pixel.
  • pBuffer: Pointer to device memory scratch buffer at least as large as value returned by the corresponding MorphGetBufferSize call.
  • eBorderType: The border type operation to be applied at source image border boundaries.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Morphological Operations

Morphological image operations.

Morphological operations are classified as neighborhood_operations.

These functions can be found in the muppim library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


Mul

Pixel by pixel multiply of two images.

Functions

Function muppiMul_32fc_C1R_Ctx

![][public]

MUppStatus muppiMul_32fc_C1R_Ctx(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel image multiplication. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. pSrc2 source_image_pointer. nSrc2Step source_image_line_step. pDst destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C1R

![][public]

MUppStatus muppiMul_32fc_C1R(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C1IR_Ctx

![][public]

MUppStatus muppiMul_32fc_C1IR_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel in place image multiplication. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiMul_32fc_C1IR

![][public]

MUppStatus muppiMul_32fc_C1IR(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiMul_32fc_C3R_Ctx

![][public]

MUppStatus muppiMul_32fc_C3R_Ctx(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel image multiplication. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. pSrc2 source_image_pointer. nSrc2Step source_image_line_step. pDst destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C3R

![][public]

MUppStatus muppiMul_32fc_C3R(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C3IR_Ctx

![][public]

MUppStatus muppiMul_32fc_C3IR_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel in place image multiplication. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiMul_32fc_C3IR

![][public]

MUppStatus muppiMul_32fc_C3IR(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiMul_32fc_C4R_Ctx

![][public]

MUppStatus muppiMul_32fc_C4R_Ctx(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel image multiplication. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. pSrc2 source_image_pointer. nSrc2Step source_image_line_step. pDst destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C4R

![][public]

MUppStatus muppiMul_32fc_C4R(const MUpp32fc *pSrc1, int nSrc1Step, const MUpp32fc *pSrc2, int nSrc2Step, MUpp32fc *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc1
  • int nSrc1Step
  • const MUpp32fc * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiMul_32fc_C4IR_Ctx

![][public]

MUppStatus muppiMul_32fc_C4IR_Ctx(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit floating point complex number (32-bit real, 32-bit imaginary) channel in place image multiplication. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiMul_32fc_C4IR

![][public]

MUppStatus muppiMul_32fc_C4IR(const MUpp32fc *pSrc, int nSrcStep, MUpp32fc *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32fc * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus


MulC

Multiplies each pixel of an image by a constant value.


MulCScale

Multiplies each pixel of an image by a constant value then scales the result by the maximum value for the data bit width.


MulScale

Pixel by pixel multiplies each pixel of two images then scales the result by the maximum value for the data bit width.


Image Norms

Primitives for computing the norms of an image, the norms of difference, and the relative errors of two images. Given an image formula {"type":"element","name":"formula","attributes":{"id":"42"},"children":[{"type":"text","text":"$pSrc$"}]} with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]},

  1. The infinity norm (Norm_Inf) is defined as the largest absolute pixel value of the image.

  2. The L1 norm (Norm_L1) is defined as the sum of the absolute pixel value of the image, i.e., formula {"type":"element","name":"formula","attributes":{"id":"45"},"children":[{"type":"text","text":"\\[Norm\\_L1 = \\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\left|\npSrc(j,i)\\right|\\]"}]}.

  3. The L2 norm (Norm_L2) is defined as the square root of the sum of the squared absolute pixel value of the image, i.e., formula {"type":"element","name":"formula","attributes":{"id":"46"},"children":[{"type":"text","text":"\\[Norm\\_L2 =\n\\sqrt{\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\left| pSrc(j,i)\\right| ^2}\\]"}]}.

Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]},

  1. The infinity norm of differece (NormDiff_Inf) is defined as the largest absolute difference between pixels of two images.

  2. The L1 norm of differece (NormDiff_L1) is defined as the sum of the absolute difference between pixels of two images, i.e., formula {"type":"element","name":"formula","attributes":{"id":"49"},"children":[{"type":"text","text":"\\[NormDiff\\_L1 =\n\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\left| pSrc1(j,i)-pSrc2(j,i)\\right|\\]"}]}.

  3. The L2 norm of differece (NormDiff_L2) is defined as the squared root of the sum of the squared absolute difference between pixels of two images, i.e., formula {"type":"element","name":"formula","attributes":{"id":"50"},"children":[{"type":"text","text":"\\[NormDiff\\_L2 = \\sqrt{\\sum_{j=0}^{H-1}\\sum_{i=0}^{W-1}\\left|\npSrc1(j,i)-pSrc2(j,i)\\right| ^2}\\]"}]}.

Given two images formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with width formula {"type":"element","name":"formula","attributes":{"id":"19"},"children":[{"type":"text","text":"$W$"}]} and height formula {"type":"element","name":"formula","attributes":{"id":"20"},"children":[{"type":"text","text":"$H$"}]},

  1. The relative error for the infinity norm of differece (NormRel_Inf) is defined as NormDiff_Inf divided by the infinity norm of the second image, i.e., formula {"type":"element","name":"formula","attributes":{"id":"51"},"children":[{"type":"text","text":"\\[NormRel\\_Inf = \\frac{NormDiff\\_Inf}{Norm\\_Inf_{src2}}\\]"}]}

  2. The relative error for the L1 norm of differece (NormRel_L1) is defined as NormDiff_L1 divided by the L1 norm of the second image, i.e., formula {"type":"element","name":"formula","attributes":{"id":"52"},"children":[{"type":"text","text":"\\[NormRel\\_L1\n= \\frac{NormDiff\\_L1}{Norm\\_L1_{src2}}\\]"}]}

  3. The relative error for the L2 norm of differece (NormRel_L2) is defined as NormDiff_L2 divided by the L2 norm of the second image, i.e., formula {"type":"element","name":"formula","attributes":{"id":"53"},"children":[{"type":"text","text":"\\[NormRel\\_L2\n= \\frac{NormDiff\\_L2}{Norm\\_L2_{src2}}\\]"}]}

The norm functions require the addition device scratch buffer for the computations.

Common parameters for muppiNorm functions include:

Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • oSizeROI: roi_specification.
  • 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, general_scratch_buffer. Use muppiNormInfGetBufferHostSize_XX_XXX to compute the required size (in bytes).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, or MUPP_COI_ERROR if an invalid channel of interest is specified, or MUPP_NOT_EVEN_STEP_ERROR if an invalid floating-point image is specified.

Parameters:

  • alpha: alpha values for each channel. Currently are only used for Normalize.
  • beta: beta values for each channel. Currently are only used for Normalize.

Submodules


Normalize

Primitives for normalize an image. These functions normalize scale and shift the input image elements so that formula {"type":"element","name":"formula","attributes":{"id":"54"},"children":[{"type":"text","text":"\\[\\|Dst\\|_{Lp}=alpha\\]"}]} (where p=Inf, 1 or 2) when nType=muppiNormInf, muppiNormL1, or muppiNormL2, respectively; or so that formula {"type":"element","name":"formula","attributes":{"id":"55"},"children":[{"type":"text","text":"\\[\\min_{I} Dst(I)=alpha, , ,\\max_{I} Dst(I)=beta\\]"}]} when nType=muppiNormMinMax. The oSizeROI specifies a sub-image to be normalized. This means that the norm or min-n-max are calculated over the sub-array, and * then this sub-array is modified to be normalized.

Common parameters for muppiNormalize functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSizeROI: roi_specification.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • alpha: norm value to normalize to or the lower range boundary.
  • beta: upper range boundary in case of the range normalization.
  • nType: The type of the normalization used.

Returns:

image_data_error_codes, * roi_error_codes

Normalize

Function muppiNormalize_32f_C1R

![][public]

MUppStatus muppiNormalize_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp32f *pDst, int nDstStep, const MUpp32f *alpha, const MUpp32f *beta, MUppiNorm nType)

One-channel 32-bit float image Normalize. For common parameter descriptions, see Common parameters for muppiNormalize functions.

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f * alpha
  • const MUpp32f * beta

Return type: MUppStatus

Function muppiNormalize_32f_C3R

![][public]

MUppStatus muppiNormalize_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSizeROI, MUpp32f *pDst, int nDstStep, const MUpp32f alpha[3], const MUpp32f beta[3], MUppiNorm nType)

Three-channel 32-bit float image Normalize. For common parameter descriptions, see Common parameters for muppiNormalize functions.

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f alpha
  • const MUpp32f beta

Return type: MUppStatus


Not

Pixel by pixel logical not of image.

Functions

Function muppiNot_8u_C1R_Ctx

![][public]

MUppStatus muppiNot_8u_C1R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical not. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C1R

![][public]

MUppStatus muppiNot_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C1IR_Ctx

![][public]

MUppStatus muppiNot_8u_C1IR_Ctx(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel in place image logical not. Parameters:

  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiNot_8u_C1IR

![][public]

MUppStatus muppiNot_8u_C1IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiNot_8u_C3R_Ctx

![][public]

MUppStatus muppiNot_8u_C3R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical not. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C3R

![][public]

MUppStatus muppiNot_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C3IR_Ctx

![][public]

MUppStatus muppiNot_8u_C3IR_Ctx(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel in place image logical not. Parameters:

  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiNot_8u_C3IR

![][public]

MUppStatus muppiNot_8u_C3IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiNot_8u_C4R_Ctx

![][public]

MUppStatus muppiNot_8u_C4R_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical not. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C4R

![][public]

MUppStatus muppiNot_8u_C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiNot_8u_C4IR_Ctx

![][public]

MUppStatus muppiNot_8u_C4IR_Ctx(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel in place image logical not. Parameters:

  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • int nSrcDstStep

Return type: MUppStatus

Function muppiNot_8u_C4IR

![][public]

MUppStatus muppiNot_8u_C4IR(MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • int nSrcDstStep

Return type: MUppStatus


Or

Pixel by pixel logical or of images.

Functions

Function muppiOr_8u_C1R_Ctx

![][public]

MUppStatus muppiOr_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C1R

![][public]

MUppStatus muppiOr_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C1IR_Ctx

![][public]

MUppStatus muppiOr_8u_C1IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_8u_C1IR

![][public]

MUppStatus muppiOr_8u_C1IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_8u_C3R_Ctx

![][public]

MUppStatus muppiOr_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C3R

![][public]

MUppStatus muppiOr_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C3IR_Ctx

![][public]

MUppStatus muppiOr_8u_C3IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_8u_C3IR

![][public]

MUppStatus muppiOr_8u_C3IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_8u_C4R_Ctx

![][public]

MUppStatus muppiOr_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C4R

![][public]

MUppStatus muppiOr_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_8u_C4IR_Ctx

![][public]

MUppStatus muppiOr_8u_C4IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_8u_C4IR

![][public]

MUppStatus muppiOr_8u_C4IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C1R_Ctx

![][public]

MUppStatus muppiOr_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C1R

![][public]

MUppStatus muppiOr_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C1IR_Ctx

![][public]

MUppStatus muppiOr_16u_C1IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C1IR

![][public]

MUppStatus muppiOr_16u_C1IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C3R_Ctx

![][public]

MUppStatus muppiOr_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C3R

![][public]

MUppStatus muppiOr_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C3IR_Ctx

![][public]

MUppStatus muppiOr_16u_C3IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C3IR

![][public]

MUppStatus muppiOr_16u_C3IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C4R_Ctx

![][public]

MUppStatus muppiOr_16u_C4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C4R

![][public]

MUppStatus muppiOr_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_16u_C4IR_Ctx

![][public]

MUppStatus muppiOr_16u_C4IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_16u_C4IR

![][public]

MUppStatus muppiOr_16u_C4IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C1R_Ctx

![][public]

MUppStatus muppiOr_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C1R

![][public]

MUppStatus muppiOr_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C1IR_Ctx

![][public]

MUppStatus muppiOr_32s_C1IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C1IR

![][public]

MUppStatus muppiOr_32s_C1IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C3R_Ctx

![][public]

MUppStatus muppiOr_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C3R

![][public]

MUppStatus muppiOr_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C3IR_Ctx

![][public]

MUppStatus muppiOr_32s_C3IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C3IR

![][public]

MUppStatus muppiOr_32s_C3IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C4R_Ctx

![][public]

MUppStatus muppiOr_32s_C4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C4R

![][public]

MUppStatus muppiOr_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiOr_32s_C4IR_Ctx

![][public]

MUppStatus muppiOr_32s_C4IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel in place image logical or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOr_32s_C4IR

![][public]

MUppStatus muppiOr_32s_C4IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus


OrC

Pixel by pixel logical or of an image with a constant.

Functions

Function muppiOrC_8u_C1R_Ctx

![][public]

MUppStatus muppiOrC_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C1R

![][public]

MUppStatus muppiOrC_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C1IR

![][public]

MUppStatus muppiOrC_8u_C1IR(const MUpp8u nConstant, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_8u_C3R_Ctx

![][public]

MUppStatus muppiOrC_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C3R

![][public]

MUppStatus muppiOrC_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C3IR

![][public]

MUppStatus muppiOrC_8u_C3IR(const MUpp8u aConstants[3], MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_8u_AC4R_Ctx

![][public]

MUppStatus muppiOrC_8u_AC4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_AC4R

![][public]

MUppStatus muppiOrC_8u_AC4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C4R_Ctx

![][public]

MUppStatus muppiOrC_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C4R

![][public]

MUppStatus muppiOrC_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_8u_C4IR

![][public]

MUppStatus muppiOrC_8u_C4IR(const MUpp8u aConstants[4], MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_16u_C1R_Ctx

![][public]

MUppStatus muppiOrC_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C1R

![][public]

MUppStatus muppiOrC_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C1IR

![][public]

MUppStatus muppiOrC_16u_C1IR(const MUpp16u nConstant, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_16u_C3R_Ctx

![][public]

MUppStatus muppiOrC_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C3R

![][public]

MUppStatus muppiOrC_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C3IR

![][public]

MUppStatus muppiOrC_16u_C3IR(const MUpp16u aConstants[3], MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_16u_AC4R_Ctx

![][public]

MUppStatus muppiOrC_16u_AC4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_AC4R

![][public]

MUppStatus muppiOrC_16u_AC4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C4R

![][public]

MUppStatus muppiOrC_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_16u_C4IR

![][public]

MUppStatus muppiOrC_16u_C4IR(const MUpp16u aConstants[4], MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_32s_C1R_Ctx

![][public]

MUppStatus muppiOrC_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C1R

![][public]

MUppStatus muppiOrC_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C1IR

![][public]

MUppStatus muppiOrC_32s_C1IR(const MUpp32s nConstant, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_32s_C3R_Ctx

![][public]

MUppStatus muppiOrC_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C3R

![][public]

MUppStatus muppiOrC_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C3IR

![][public]

MUppStatus muppiOrC_32s_C3IR(const MUpp32s aConstants[3], MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiOrC_32s_AC4R_Ctx

![][public]

MUppStatus muppiOrC_32s_AC4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step. oSizeROI roi_specification. muppStreamCtx application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_AC4R

![][public]

MUppStatus muppiOrC_32s_AC4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C4R

![][public]

MUppStatus muppiOrC_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[4], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiOrC_32s_C4IR

![][public]

MUppStatus muppiOrC_32s_C4IR(const MUpp32s aConstants[4], MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s aConstants
  • int nSrcDstStep

Return type: MUppStatus


Packed To Planar Channel Copy

Split a packed multi-channel image into multiple single channel planes.

E.g. copy the three channels of an RGB image into three separate single-channel images.

Common parameters for muppiCopy_CXPX functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • aDst: destination_planar_image_pointer_array.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Perspective Transform

The set of perspective transform functions available in the library.

Perspective Transform Error Codes

Submodules


Planar To Packed Channel Copy

Combine multiple image planes into a packed multi-channel image.

E.g. copy three single-channel images into a single 3-channel image.

Common parameters for muppiCopy_PXCX functions include:

Parameters:

  • aSrc: Planar source_image_pointer.
  • nSrcStep: source_planar_image_pointer_array.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Image Proximity

Primitives for computing the proximity measure between a source image and a template image.

General Introduction

There are basically two approaches to compute the proximity measure for template matching, Euclidean distance and the cross correlation.

  1. Euclidean distance computes the sum of the squared distance (SSD) between the corresponding pixels of the source image and the template image. The smaller the distance is, the more similar the source image and the template image is around the pixel. The anchor of the template image is used during the computations, which always lies in the gemotric center of the image. Given a source image formula {"type":"element","name":"formula","attributes":{"id":"42"},"children":[{"type":"text","text":"$pSrc$"}]} ( formula {"type":"element","name":"formula","attributes":{"id":"82"},"children":[{"type":"text","text":"$W_s \\times H_s$"}]}) and a template image formula {"type":"element","name":"formula","attributes":{"id":"83"},"children":[{"type":"text","text":"$pTpl$"}]} ( formula {"type":"element","name":"formula","attributes":{"id":"84"},"children":[{"type":"text","text":"$W_t \\times H_t$"}]}), the Euclidean distance formula {"type":"element","name":"formula","attributes":{"id":"85"},"children":[{"type":"text","text":"$D_{st}(c,r)$"}]} between two images at pixel in row formula {"type":"element","name":"formula","attributes":{"id":"86"},"children":[{"type":"text","text":"$r$"}]} and column formula {"type":"element","name":"formula","attributes":{"id":"87"},"children":[{"type":"text","text":"$c$"}]} is computed as ( formula {"type":"element","name":"formula","attributes":{"id":"88"},"children":[{"type":"text","text":"$s$"}]} stands for source image and formula {"type":"element","name":"formula","attributes":{"id":"89"},"children":[{"type":"text","text":"$t$"}]} for template image for short): formula {"type":"element","name":"formula","attributes":{"id":"90"},"children":[{"type":"text","text":"\\[D_{st}(c,r)=\\sum_{j=0}^{H_t-1}\\sum_{i=0}^{W_t-1}[pTpl(j,i)-pSrc(j+c-\\frac{H_t}{2},\ni+r-\\frac{W_t}{2})]^2 \\]"}]}

  2. Cross correlation computes the sum of the product between the corresponding pixels of the source image and the template image. The cross correlation formula {"type":"element","name":"formula","attributes":{"id":"91"},"children":[{"type":"text","text":"$R_{st}(c,r)$"}]} is calculated as: formula {"type":"element","name":"formula","attributes":{"id":"92"},"children":[{"type":"text","text":"\\[R_{st}(c,r)=\\sum_{j=0}^{H_t-1}\\sum_{i=0}^{W_t-1}[pTpl(j,i)\\cdot\npSrc(j+c-\\frac{H_t}{2}, i+r-\\frac{W_t}{2})] \\]"}]} The larger the cross correlation value is, the more similar the source image and the template image is around the pixel.

  3. The cross correlation formula {"type":"element","name":"formula","attributes":{"id":"91"},"children":[{"type":"text","text":"$R_{st}(c,r)$"}]} is affected by the brightness of the images which may vary due to the lighting and exposure conditions. Therefore, MUPP computes the cross correlation coefficient to circumvent this dependence. This is typically done at every step by subtracting the mean from every pixel value, i.e., formula {"type":"element","name":"formula","attributes":{"id":"93"},"children":[{"type":"text","text":"\\[\\tilde{R}_{st}(c,r)=\\sum_{j=0}^{H_t-1}\\sum_{i=0}^{W_t-1}[pTpl(j,i)-Mean_t]\\cdot\n[pSrc(j+c-\\frac{H_t}{2}, i+r-\\frac{W_t}{2})-Mean_s] \\]"}]}

MUPP computes the normalized values of Euclidean distance, cross correlation and the cross correlation coefficient.

  1. The normalized Euclidean distance formula {"type":"element","name":"formula","attributes":{"id":"94"},"children":[{"type":"text","text":"$\\sigma_{st}(c,r)$"}]} is defined as: formula {"type":"element","name":"formula","attributes":{"id":"95"},"children":[{"type":"text","text":"\\[\\sigma_{st}(c,r) = \\frac{D_{st}(c,r)}{\\sqrt{R_{ss}(c,r)\\cdot\nR_{tt}(\\frac{H_t}{2},\\frac{W_t}{2})}} \\]"}]}

  2. The normalized cross correlation formula {"type":"element","name":"formula","attributes":{"id":"96"},"children":[{"type":"text","text":"$\\rho_{st}(c,r)$"}]} is defined as: formula {"type":"element","name":"formula","attributes":{"id":"97"},"children":[{"type":"text","text":"\\[\\rho_{st}(c,r) = \\frac{R_{st}(c,r)}{\\sqrt{R_{ss}(c,r)\\cdot\nR_{tt}(\\frac{H_t}{2},\\frac{W_t}{2})}} \\]"}]} The formula {"type":"element","name":"formula","attributes":{"id":"98"},"children":[{"type":"text","text":"$R_{ss}(c,r)$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"99"},"children":[{"type":"text","text":"$R_{tt}(\\frac{H_t}{2}, \\frac{W_t}{2}$"}]} denote the auto correlation of the source image and the template image individually. They are defined as: formula {"type":"element","name":"formula","attributes":{"id":"100"},"children":[{"type":"text","text":"\\[R_{ss}(c,r)=\\sum_{j=c-\\frac{H_t}{2}}^{c+\\frac{H_t}{2}}\\sum_{i=r-\\frac{W_t}{2}}^{r+\\frac{W_t}{2}}pSrc(j,\ni) \\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"101"},"children":[{"type":"text","text":"\\[R_{tt}(\\frac{H_t}{2},\\frac{W_t}{2})=\\sum_{j=0}^{H_t-1}\\sum_{i=0}^{W_t-1}pTpl(j,i)\n\\]"}]}

  3. Similarly, the normalized cross correlation coefficient formula {"type":"element","name":"formula","attributes":{"id":"102"},"children":[{"type":"text","text":"$\\gamma_{st}(c,r)$"}]} is calculated as: formula {"type":"element","name":"formula","attributes":{"id":"103"},"children":[{"type":"text","text":"\\[\\gamma_{st}(c,r) =\n\\frac{\\tilde{R}_{st}(c,r)}{\\sqrt{\\tilde{R}_{ss}(c,r)\\cdot\n\\tilde{R}_{tt}(\\frac{H_t}{2},\\frac{W_t}{2})}} \\]"}]} The formula {"type":"element","name":"formula","attributes":{"id":"104"},"children":[{"type":"text","text":"$\\tilde{R}_{ss}(c,r)$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"105"},"children":[{"type":"text","text":"$\\tilde{R}_{tt}(\\frac{H_t}{2},\n\\frac{W_t}{2}$"}]} are defined as: formula {"type":"element","name":"formula","attributes":{"id":"106"},"children":[{"type":"text","text":"\\[\\tilde{R}_{ss}(c,r)=\\sum_{j=c-\\frac{H_t}{2}}^{c+\\frac{H_t}{2}}\\sum_{i=r-\\frac{W_t}{2}}^{r+\\frac{W_t}{2}}[pSrc(j,\ni)-Mean_s] \\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"107"},"children":[{"type":"text","text":"\\[\\tilde{R}_{tt}(\\frac{H_t}{2},\\frac{W_t}{2})=\\sum_{j=0}^{H_t-1}\\sum_{i=0}^{W_t-1}[pTpl(j,i)-Mean_t]\n\\]"}]}

Categorizations

The Euclidean distance and the cross correlation are categorized into three types, full, same, and valid.

  1. Full mode indicates that the anchor of the template image starts from the outside of the source image, assuming the out-of-boundary pixels are zeor-padded. The size of the destination image is formula {"type":"element","name":"formula","attributes":{"id":"108"},"children":[{"type":"text","text":"$(W_s + W_t - 1) \\times\n(H_s + H_t - 1)$"}]}.

  2. Same mode means that the anchor of the template image starts from the top left pixel of the source image. All the out-of-boundary pixels are also zero-padded. The size of the destination image is the same as the source one, i.e., formula {"type":"element","name":"formula","attributes":{"id":"82"},"children":[{"type":"text","text":"$W_s \\times H_s$"}]}.

  3. Valid mode indicates that there are no out-of-boudnary readings from the source image. The anchor of the template image starts from the inside of the source image. The size of the destination image is formula {"type":"element","name":"formula","attributes":{"id":"109"},"children":[{"type":"text","text":"$(W_s - W_t + 1) \\times\n(H_s - H_t + 1)$"}]}.

Submodules


IQA

Primitives for computing the image quality between two images, such as MSE, PSNR, SSIM, and MS-SSIM.


Image Quality Index

Primitives for computing the image quality index of two images.


Rank Filters

The set of functions providing min/max/median values for rectangular mask region with/without border available in the library.

Submodules


RectStdDev

Primitives for computing the stansdard deviation of the integral images. The function computes the standard deviation of the pixel in the rectangular window with the integral image formula {"type":"element","name":"formula","attributes":{"id":"42"},"children":[{"type":"text","text":"$pSrc$"}]} and the squared integral image formula {"type":"element","name":"formula","attributes":{"id":"63"},"children":[{"type":"text","text":"$pSqr$"}]}, which can be obtained by calling Integral and SqrIntegral.

The standard deviation of the pixel formula {"type":"element","name":"formula","attributes":{"id":"65"},"children":[{"type":"text","text":"$(j, i)$"}]} can be computed using the formula: formula {"type":"element","name":"formula","attributes":{"id":"66"},"children":[{"type":"text","text":"\\[pDst(j, i) = \\sqrt{max(0, \\frac{\\sum(SqrIntegral)\\cdot N -\n(\\sum(Integral))^2}{N^2})}\\]"}]} where formula {"type":"element","name":"formula","attributes":{"id":"67"},"children":[{"type":"text","text":"$\\sum(SqrIntegral) =\npSqr[j+oRect.y+oRect.height, i+oRect.x+oRect.width] -\npSqr[j+oRect.y,i+oRect.x+oRect.width]\n- pSqr[j+oRect.y+oRect.height, i+oRect.x] + pSqr[j+oRect.y, i+oRect.x]$"}]}, formula {"type":"element","name":"formula","attributes":{"id":"68"},"children":[{"type":"text","text":"$\\sum(Integral) = pSrc[j+oRect.y+oRect.height, i+oRect.x+oRect.width] -\npSrc[j+oRect.y,i+oRect.x+oRect.width]\n- pSrc[j+oRect.y+oRect.height, i+oRect.x] + pSrc[j+oRect.y, i+oRect.x]$"}]}, formula {"type":"element","name":"formula","attributes":{"id":"69"},"children":[{"type":"text","text":"$N = oRect.width \\cdot oRect.height$"}]}.

The size of the formula {"type":"element","name":"formula","attributes":{"id":"42"},"children":[{"type":"text","text":"$pSrc$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"63"},"children":[{"type":"text","text":"$pSqr$"}]} should be formula {"type":"element","name":"formula","attributes":{"id":"70"},"children":[{"type":"text","text":"$(oSizeROI.width +\noRect.x + oRect.width, oSizeROI.height + oRect.y + oRect.height).$"}]}

RectStdDev

Function muppiRectStdDev_32f_C1R_Ctx

![][public]

MUppStatus muppiRectStdDev_32f_C1R_Ctx(const MUpp32f *pSrc, int nSrcStep, const MUpp64f *pSqr, int nSqrStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect, MUppStreamContext muppStreamCtx)

One-channel 32-bit floating point image RectStdDev.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSqr: destination_image_pointer.
  • nSqrStep: destination_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oRect: rectangular window
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp64f * pSqr
  • int nSqrStep
  • int nDstStep

Return type: MUppStatus

Function muppiRectStdDev_32f_C1R

![][public]

MUppStatus muppiRectStdDev_32f_C1R(const MUpp32f *pSrc, int nSrcStep, const MUpp64f *pSqr, int nSqrStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp64f * pSqr
  • int nSqrStep
  • int nDstStep

Return type: MUppStatus

Function muppiRectStdDev_32s_C1RSfs_Ctx

![][public]

MUppStatus muppiRectStdDev_32s_C1RSfs_Ctx(const MUpp32s *pSrc, int nSrcStep, const MUpp32s *pSqr, int nSqrStep, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect, int nScaleFactor, MUppStreamContext muppStreamCtx)

One-channel 32-bit signed image RectStdDev, scaled by formula {"type":"element","name":"formula","attributes":{"id":"71"},"children":[{"type":"text","text":"$2^(-nScaleFactor)$"}]}.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSqr: destination_image_pointer.
  • nSqrStep: destination_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oRect: rectangular window
  • nScaleFactor: integer_result_scaling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • const MUpp32s * pSqr
  • int nSqrStep
  • int nDstStep
  • int nScaleFactor

Return type: MUppStatus

Function muppiRectStdDev_32s_C1RSfs

![][public]

MUppStatus muppiRectStdDev_32s_C1RSfs(const MUpp32s *pSrc, int nSrcStep, const MUpp32s *pSqr, int nSqrStep, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect, int nScaleFactor)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • const MUpp32s * pSqr
  • int nSqrStep
  • int nDstStep
  • int nScaleFactor

Return type: MUppStatus

Function muppiRectStdDev_32s32f_C1R_Ctx

![][public]

MUppStatus muppiRectStdDev_32s32f_C1R_Ctx(const MUpp32s *pSrc, int nSrcStep, const MUpp64f *pSqr, int nSqrStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect, MUppStreamContext muppStreamCtx)

One-channel 32-bit signed image RectStdDev.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSqr: destination_image_pointer.
  • nSqrStep: destination_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • oRect: rectangular window
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • const MUpp64f * pSqr
  • int nSqrStep
  • int nDstStep

Return type: MUppStatus

Function muppiRectStdDev_32s32f_C1R

![][public]

MUppStatus muppiRectStdDev_32s32f_C1R(const MUpp32s *pSrc, int nSrcStep, const MUpp64f *pSqr, int nSqrStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUppiRect oRect)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • const MUpp64f * pSqr
  • int nSqrStep
  • int nDstStep

Return type: MUppStatus


Remap

Routines providing remap functionality.

Remap supports the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC MUPPI_INTER_CUBIC2P_BSPLINE MUPPI_INTER_CUBIC2P_CATMULLROM MUPPI_INTER_CUBIC2P_B05C03 MUPPI_INTER_LANCZOS

Remap chooses source pixels using pixel coordinates explicitely supplied in two 2D device memory image arrays pointed to by the pXMap and pYMap pointers. The pXMap array contains the X coordinated and the pYMap array contains the Y coordinate of the corresponding source image pixel to use as input. These coordinates are in floating point format so fraction pixel positions can be used. The coordinates of the source pixel to sample are determined as follows:

nSrcX = pxMap[nDstX, nDstY] nSrcY = pyMap[nDstX, nDstY]

In the Remap functions below source image clip checking is handled as follows:

If the source pixel fractional x and y coordinates are greater than or equal to oSizeROI.x and less than oSizeROI.x + oSizeROI.width and greater than or equal to oSizeROI.y and less than oSizeROI.y + oSizeROI.height then the source pixel is considered to be within the source image clip rectangle and the source image is sampled. Otherwise the source image is not sampled and a destination pixel is not written to the destination image.

Error Codes

The remap primitives return the following error codes:

  • ::MUPP_WRONG_INTERSECTION_ROI_ERROR indicates an error condition if srcROIRect has no intersection with the source image.
  • ::MUPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.

,Common parameters for muppiRemap packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Size in pixels of the source image.
  • oSrcROI: Region of interest in the source image.
  • pXMap: Device memory pointer to 2D image array of X coordinate values to be used when sampling source image.
  • nXMapStep: pXMap image array line step in bytes.
  • pYMap: Device memory pointer to 2D image array of Y coordinate values to be used when sampling source image.
  • nYMapStep: pYMap image array line step in bytes.
  • pDst: destination_image_pointer. nDstStep destination_image_line_step.
  • oDstSizeROI: Region of interest size in the destination image.
  • eInterpolation: The type of eInterpolation to perform resampling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Common parameters for muppiRemap planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Size in pixels of the source image.
  • oSrcROI: Region of interest in the source image.
  • pXMap: Device memory pointer to 2D image array of X coordinate values to be used when sampling source image.
  • nXMapStep: pXMap image array line step in bytes.
  • pYMap: Device memory pointer to 2D image array of Y coordinate values to be used when sampling source image.
  • nYMapStep: pYMap image array line step in bytes.
  • pDst: destination_planar_image_pointer_array. nDstStep destination_image_line_step. oDstSizeROI Region of interest size in the destination image.
  • eInterpolation: The type of eInterpolation to perform resampling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Remap

Remaps images.

Function muppiRemap_8u_C1R_Ctx

![][public]

MUppStatus muppiRemap_8u_C1R_Ctx(const MUpp8u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp8u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 8-bit unsigned image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_8u_C1R

![][public]

MUppStatus muppiRemap_8u_C1R(const MUpp8u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp8u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_8u_C3R_Ctx

![][public]

MUppStatus muppiRemap_8u_C3R_Ctx(const MUpp8u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp8u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

3 channel 8-bit unsigned image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_8u_C3R

![][public]

MUppStatus muppiRemap_8u_C3R(const MUpp8u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp8u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16u_C1R_Ctx

![][public]

MUppStatus muppiRemap_16u_C1R_Ctx(const MUpp16u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 16-bit unsigned image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16u_C1R

![][public]

MUppStatus muppiRemap_16u_C1R(const MUpp16u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16u_C3R_Ctx

![][public]

MUppStatus muppiRemap_16u_C3R_Ctx(const MUpp16u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

3 channel 16-bit unsigned image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16u_C3R

![][public]

MUppStatus muppiRemap_16u_C3R(const MUpp16u *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16u *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16s_C1R_Ctx

![][public]

MUppStatus muppiRemap_16s_C1R_Ctx(const MUpp16s *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16s *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 16-bit signed image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16s_C1R

![][public]

MUppStatus muppiRemap_16s_C1R(const MUpp16s *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16s *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16s_C3R_Ctx

![][public]

MUppStatus muppiRemap_16s_C3R_Ctx(const MUpp16s *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16s *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

3 channel 16-bit signed image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_16s_C3R

![][public]

MUppStatus muppiRemap_16s_C3R(const MUpp16s *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp16s *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp16s * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_32f_C1R_Ctx

![][public]

MUppStatus muppiRemap_32f_C1R_Ctx(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 32-bit floating point image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_32f_C1R

![][public]

MUppStatus muppiRemap_32f_C1R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_32f_C3R_Ctx

![][public]

MUppStatus muppiRemap_32f_C3R_Ctx(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

3 channel 32-bit floating point image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_32f_C3R

![][public]

MUppStatus muppiRemap_32f_C3R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp32f *pXMap, int nXMapStep, const MUpp32f *pYMap, int nYMapStep, MUpp32f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • const MUpp32f * pXMap
  • int nXMapStep
  • const MUpp32f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_64f_C1R_Ctx

![][public]

MUppStatus muppiRemap_64f_C1R_Ctx(const MUpp64f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp64f *pXMap, int nXMapStep, const MUpp64f *pYMap, int nYMapStep, MUpp64f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

1 channel 64-bit floating point image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp64f * pSrc
  • int nSrcStep
  • const MUpp64f * pXMap
  • int nXMapStep
  • const MUpp64f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_64f_C1R

![][public]

MUppStatus muppiRemap_64f_C1R(const MUpp64f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp64f *pXMap, int nXMapStep, const MUpp64f *pYMap, int nYMapStep, MUpp64f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp64f * pSrc
  • int nSrcStep
  • const MUpp64f * pXMap
  • int nXMapStep
  • const MUpp64f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_64f_C3R_Ctx

![][public]

MUppStatus muppiRemap_64f_C3R_Ctx(const MUpp64f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp64f *pXMap, int nXMapStep, const MUpp64f *pYMap, int nYMapStep, MUpp64f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation, MUppStreamContext muppStreamCtx)

3 channel 64-bit floating point image remap.

For common parameter descriptions, see Common parameters for muppiRemap packed pixel functions.

Parameters:

  • const MUpp64f * pSrc
  • int nSrcStep
  • const MUpp64f * pXMap
  • int nXMapStep
  • const MUpp64f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiRemap_64f_C3R

![][public]

MUppStatus muppiRemap_64f_C3R(const MUpp64f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, const MUpp64f *pXMap, int nXMapStep, const MUpp64f *pYMap, int nYMapStep, MUpp64f *pDst, int nDstStep, MUppiSize oDstSizeROI, int eInterpolation)

Parameters:

  • const MUpp64f * pSrc
  • int nSrcStep
  • const MUpp64f * pXMap
  • int nXMapStep
  • const MUpp64f * pYMap
  • int nYMapStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus


Resize

Resize functions use scale factor automatically determined by the width and height ratios of input and output roi_specification.

This simplified function replaces the previous version which was deprecated in an earlier release. In this function the resize scale factor is automatically determined by the width and height ratios of oSrcRectROI and oDstRectROI. If either of those parameters intersect their respective image sizes then pixels outside the image size width and height will not be processed.

Resize supports the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC MUPPI_INTER_SUPER MUPPI_INTER_LANCZOS

Error Codes

The resize primitives return the following error codes:

  • ::MUPP_RESIZE_NO_OPERATION_ERROR if either destination ROI width or height is less than 1 pixel.
  • ::MUPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.
  • ::MUPP_SIZE_ERROR if source size width or height is less than 2

pixels.

Resize

Resizes images.

Common parameters for muppiResize packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer to origin of source image.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Size in pixels of the entire source image.
  • oSrcRectROI: Region of interest in the source image (may overlap source image size width and height).
  • pDst: destination_image_pointer to origin of destination image.
  • nDstStep: destination_image_line_step. oDstSize Size in pixels of the entire destination image.
  • oDstRectROI: Region of interest in the destination image (may overlap destination image size width and height).
  • eInterpolation: The type of eInterpolation to perform resampling (16f versions do not support Lanczos interpolation).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Common parameters for muppiResize planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane origin pointers).
  • nSrcStep: source_image_line_step. oSrcSize Size in pixels of the entire source image.
  • oSrcRectROI: Region of interest in the source image (may overlap source image size width and height).
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane origin pointers).
  • nDstStep: destination_image_line_step. oDstSize Size in pixels of the entire destination image.
  • oDstRectROI: Region of interest in the destination image (may overlap destination image size width and height).
  • eInterpolation: The type of eInterpolation to perform resampling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Function muppiResize_32f_C1R

![][public]

MUppStatus muppiResize_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcRectROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSize, MUppiRect oDstRectROI, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus

Function muppiResize_32f_C3R

![][public]

MUppStatus muppiResize_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUppiSize oSrcSize, MUppiRect oSrcRectROI, MUpp32f *pDst, int nDstStep, MUppiSize oDstSize, MUppiRect oDstRectROI, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • int eInterpolation

Return type: MUppStatus


ResizeBatch

ResizeBatch functions use scale factor automatically determined by the width and height ratios for each pair of input / output images in provided batches.

In this function as in muppiResize the resize scale factor is automatically determined by the width and height ratios of oSrcRectROI and oDstRectROI. If either of those parameters intersect their respective image sizes then pixels outside the image size width and height will not be processed. Details of the resize operation are described above in the Resize section. ResizeBatch generally takes the same parameter list as Resize except that there is a list of N instances of those parameters (N > 1) and that list is passed in device memory. 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 source ROI rectangle and one single destination ROI rectangle which are 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. A single set of oSrcRectROI and oDstRectROI values are applied to each source image and destination image in the batch in the muppiResizeBatch version of the function while per image specific oSrcRectROI and oDstRectROI values can be used in the muppiResizeBatch_Advanced version of the function. Source and destination image sizes may vary but oSmallestSrcSize and oSmallestDstSize must be set to the smallest source and destination image sizes in the batch. The parameters in the MUppiResizeBatchCXR structure represent the corresponding per-image muppiResize parameters for each image in the muppiResizeBatch functions and the MUppiImageDescriptor and MUppiResizeBatchROI_Advanced structures represent the corresponding per-image muppiResize parameters for the muppiResizeBatch_Advanced functions. The MUppiResizeBatchCXR or MUppiImageDescriptor and MUppiResizeBatchROI_Advanced arrays must be in device memory.

ResizeBatch supports the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC MUPPI_INTER_SUPER

Below is the diagram of batch resize functions for variable ROIs. Figure shows the flexibility that the API can handle. The ROIs for source and destination images can be any rectangular width and height that reflects the needed resize factors, inside or beyond the image boundary.

Error Codes

The resize primitives return the following error codes:

  • ::MUPP_RESIZE_NO_OPERATION_ERROR if either destination ROI width or height is less than 1 pixel.
  • ::MUPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.
  • ::MUPP_SIZE_ERROR if source size width or height is less than 2

pixels.

Common parameters for muppiResizeBatch functions include:

Parameters:

  • oSmallestSrcSize: Size in pixels of the entire smallest source image width and height, may be from different images.
  • oSrcRectROI: Region of interest in the source images (may overlap source image size width and height).
  • oSmallestDstSize: Size in pixels of the entire smallest destination image width and height, may be from different images.
  • oDstRectROI: Region of interest in the destination images (may overlap destination image size width and height).
  • eInterpolation: The type of eInterpolation to perform resampling. Currently limited to MUPPI_INTER_NN, MUPPI_INTER_LINEAR, MUPPI_INTER_CUBIC, or MUPPI_INTER_SUPER.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiResizeBatchCXR structures.
  • pBatchSrc: Device pointer to MUppiImageDescriptor list of source image descriptors. User needs to intialize this structure and copy it to device.
  • pBatchDst: Device pointer to MUppiImageDescriptor list of destination image descriptors. User needs to intialize this structure and copy it to device.
  • pBatchROI: Device pointer to MUppiResizeBatchROI_Advanced list of per-image variable ROIs. User needs to initialize this structure and copy it to device.
  • nBatchSize: Number of MUppiResizeBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Common parameters for muppiResizeBatchAdvanced functions include:

Parameters:

  • nMaxWidth: The maximum width of all destination ROIs
  • nMaxHeight: The maximum height of all destination ROIs
  • pBatchSrc: Device pointer to MUppiImageDescriptor list of source image descriptors. User needs to intialize this structure and copy it to device.
  • pBatchDst: Device pointer to MUppiImageDescriptor list of destination image descriptors. User needs to intialize this structure and copy it to device.
  • pBatchROI: Device pointer to MUppiResizeBatchROI_Advanced list of per-image variable ROIs. User needs to initialize this structure and copy it to device.
  • nBatchSize: Number of images in a batch.
  • eInterpolation: The type of eInterpolation to perform resampling.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Error Codes

Functions

Function muppiResizeBatch_8u_C1R_Ctx

![][public]

MUppStatus muppiResizeBatch_8u_C1R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

1 channel 8-bit image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_8u_C1R

![][public]

MUppStatus muppiResizeBatch_8u_C1R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_8u_C3R_Ctx

![][public]

MUppStatus muppiResizeBatch_8u_C3R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

3 channel 8-bit image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_8u_C3R

![][public]

MUppStatus muppiResizeBatch_8u_C3R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_8u_C4R_Ctx

![][public]

MUppStatus muppiResizeBatch_8u_C4R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

4 channel 8-bit image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_8u_C4R

![][public]

MUppStatus muppiResizeBatch_8u_C4R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C1R_Ctx

![][public]

MUppStatus muppiResizeBatch_32f_C1R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

1 channel 32-bit floating point image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C1R

![][public]

MUppStatus muppiResizeBatch_32f_C1R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C3R_Ctx

![][public]

MUppStatus muppiResizeBatch_32f_C3R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

3 channel 32-bit floating point image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C3R

![][public]

MUppStatus muppiResizeBatch_32f_C3R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C4R_Ctx

![][public]

MUppStatus muppiResizeBatch_32f_C4R_Ctx(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize, MUppStreamContext muppStreamCtx)

4 channel 32-bit floating point image resize batch.

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

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus

Function muppiResizeBatch_32f_C4R

![][public]

MUppStatus muppiResizeBatch_32f_C4R(MUppiSize oSmallestSrcSize, MUppiRect oSrcRectROI, MUppiSize oSmallestDstSize, MUppiRect oDstRectROI, int eInterpolation, MUppiResizeBatchCXR *pBatchList, unsigned int nBatchSize)

Parameters:

  • int eInterpolation
  • unsigned int nBatchSize

Return type: MUppStatus


ResizeSqrPixel

ResizeSqrPixel functions attempt to choose source pixels that would approximately represent the center of the destination pixels. It does so by using the following scaling formula to select source pixels for interpolation:

nAdjustedXFactor = 1.0 / nXFactor; nAdjustedYFactor = 1.0 / nYFactor; nAdjustedXShift = nXShift * nAdjustedXFactor + ((1.0 - nAdjustedXFactor) * 0.5); nAdjustedYShift = nYShift * nAdjustedYFactor + ((1.0 - nAdjustedYFactor) * 0.5); nSrcX = nAdjustedXFactor * nDstX - nAdjustedXShift; nSrcY = nAdjustedYFactor * nDstY - nAdjustedYShift;

ResizeSqrPixel functions support the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC MUPPI_INTER_CUBIC2P_BSPLINE MUPPI_INTER_CUBIC2P_CATMULLROM MUPPI_INTER_CUBIC2P_B05C03 MUPPI_INTER_SUPER MUPPI_INTER_LANCZOS

In the ResizeSqrPixel functions below source image clip checking is handled as follows:

If the source pixel fractional x and y coordinates are greater than or equal to oSizeROI.x and less than oSizeROI.x + oSizeROI.width and greater than or equal to oSizeROI.y and less than oSizeROI.y + oSizeROI.height then the source pixel is considered to be within the source image clip rectangle and the source image is sampled. Otherwise the source image is not sampled and a destination pixel is not written to the destination image.

Error Codes

The resize primitives return the following error codes:

  • ::MUPP_WRONG_INTERSECTION_ROI_ERROR indicates an error condition if srcROIRect has no intersection with the source image.
  • ::MUPP_RESIZE_NO_OPERATION_ERROR if either destination ROI width or height is less than 1 pixel.
  • ::MUPP_RESIZE_FACTOR_ERROR Indicates an error condition if either

nXFactor or nYFactor is less than or equal to zero or in the case of MUPPI_INTER_SUPER are not both downscaling.


Rotate

Rotates an image around the origin (0,0) and then shifts it.

Rotate Error Codes

Submodules


RShiftC

Pixel by pixel right shift of an image by a constant value.

Functions

Function muppiRShiftC_8u_C1R

![][public]

MUppStatus muppiRShiftC_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_8u_C3R

![][public]

MUppStatus muppiRShiftC_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_8u_C4R

![][public]

MUppStatus muppiRShiftC_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_8s_C1R

![][public]

MUppStatus muppiRShiftC_8s_C1R(const MUpp8s *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp8s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8s * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_8s_C3R

![][public]

MUppStatus muppiRShiftC_8s_C3R(const MUpp8s *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp8s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_8s_C4R

![][public]

MUppStatus muppiRShiftC_8s_C4R(const MUpp8s *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp8s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16u_C1R

![][public]

MUppStatus muppiRShiftC_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16u_C3R

![][public]

MUppStatus muppiRShiftC_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16u_C4R

![][public]

MUppStatus muppiRShiftC_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16s_C1R

![][public]

MUppStatus muppiRShiftC_16s_C1R(const MUpp16s *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp16s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16s * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16s_C3R

![][public]

MUppStatus muppiRShiftC_16s_C3R(const MUpp16s *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp16s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_16s_C4R

![][public]

MUppStatus muppiRShiftC_16s_C4R(const MUpp16s *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp16s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_32s_C1R

![][public]

MUppStatus muppiRShiftC_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_32s_C3R

![][public]

MUppStatus muppiRShiftC_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiRShiftC_32s_C4R

![][public]

MUppStatus muppiRShiftC_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32u aConstants[4], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32u aConstants
  • int nDstStep

Return type: MUppStatus


Scale Bit Depth

Functions for scaling bit depth up or down.

Submodules


Scale To Higher Bit Depth

Functions for scaling images to higher bit depth.

To map source pixel srcPixelValue to destination pixel dstPixelValue the following equation is used: dstPixelValue = dstMinRangeValue + scaleFactor * (srcPixelValue -

srcMinRangeValue)

where scaleFactor = (dstMaxRangeValue - dstMinRangeValue) / (srcMaxRangeValue

  • srcMinRangeValue).

For conversions between integer data types, the entire integer numeric range of the input data type is mapped onto the entire integer numeric range of the output data type.

For conversions to floating point data types the floating point data range is defined by the user supplied floating point values of nMax and nMin which are used as the dstMaxRangeValue and dstMinRangeValue respectively in the scaleFactor and dstPixelValue calculations and also as the saturation values to which output data is clamped.

When converting from floating-point values to integer values, nMax and nMin are used as the srcMaxRangeValue and srcMinRangeValue respectively in the scaleFactor and dstPixelValue calculations. Output values are saturated and clamped to the full output integer pixel value range.

Common parameters for muppiScale to higher bit depth functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • nMin: specifies the minimum saturation value to which every output value will be clamped.
  • nMax: specifies the maximum saturation value to which every output value will be clamped.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, MUPP_SCALE_RANGE_ERROR indicates an error condition if nMax <= nMin.

Functions

Function muppiScale_8u32f_C3R

![][public]

MUppStatus muppiScale_8u32f_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f nMin, MUpp32f nMax)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Scale To Lower Bit Depth

Functions for scaling images to lower bit depth.

To map source pixel srcPixelValue to destination pixel dstPixelValue the following equation is used: dstPixelValue = dstMinRangeValue + scaleFactor * (srcPixelValue -

srcMinRangeValue)

where scaleFactor = (dstMaxRangeValue - dstMinRangeValue) / (srcMaxRangeValue

  • srcMinRangeValue).

For conversions between integer data types, the entire integer numeric range of the input data type is mapped onto the entire integer numeric range of the output data type.

For conversions to floating point data types the floating point data range is defined by the user supplied floating point values of nMax and nMin which are used as the dstMaxRangeValue and dstMinRangeValue respectively in the scaleFactor and dstPixelValue calculations and also as the saturation values to which output data is clamped.

When converting from floating-point values to integer values, nMax and nMin are used as the srcMaxRangeValue and srcMinRangeValue respectively in the scaleFactor and dstPixelValue calculations. Output values are saturated and clamped to the full output integer pixel value range.

Common parameters for muppiScale to lower bit depth functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • hint: algorithm performance or accuracy selector, currently ignored
  • nMin: specifies the minimum saturation value to which every output value will be clamped.
  • nMax: specifies the maximum saturation value to which every output value will be clamped.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, MUPP_SCALE_RANGE_ERROR indicates an error condition if nMax <= nMin.

Functions

Function muppiScale_32f8u_C3R

![][public]

MUppStatus muppiScale_32f8u_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUpp32f nMin, MUpp32f nMax)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Set

Functions for setting all pixels within the ROI to a specific value.

Common parameters for muppiSet functions include:

Parameters:

  • nValue: The pixel value to be set.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiSet_8u_C1R

![][public]

MUppStatus muppiSet_8u_C1R(const MUpp8u nValue, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u nValue
  • int nDstStep

Return type: MUppStatus

Function muppiSet_8u_C3R

![][public]

MUppStatus muppiSet_8u_C3R(const MUpp8u aValue[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u aValue
  • int nDstStep

Return type: MUppStatus

Function muppiSet_32f_C1R

![][public]

MUppStatus muppiSet_32f_C1R(const MUpp32f nValue, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f nValue
  • int nDstStep

Return type: MUppStatus

Function muppiSet_32f_C3R

![][public]

MUppStatus muppiSet_32f_C3R(const MUpp32f aValue[3], MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f aValue
  • int nDstStep

Return type: MUppStatus


Image Set Operations

Functions for setting all pixels within the ROI to a specific value.

Submodules


Sqr

Square each pixel in an image.


SqrIntegral

Primitives for computing both the integral and the squared integral images of a given image.


Sqrt

Pixel by pixel square root of each pixel in an image.


Statistical Operations

Primitives for computing the statistical properties of an image. Some statistical primitives also require scratch buffer during the computation. For details, please refer to general_scratch_buffer.

These functions can be found in the muppist library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Common parameters for muppiGetBufferHostSize functions include: Parameters:

  • oSizeROI: roi_specification.
  • hpBufferSize: Required buffer size. Important: hpBufferSize is a host pointer. general_scratch_buffer.
  • muppStreamCtx: application_managed_stream_context.

Returns:

MUPP_NULL_POINTER_ERROR if hpBufferSize is 0 (NULL), roi_error_codes.

Submodules


Sub

Pixel by pixel subtraction of two images.


SubC

Subtracts a constant value from each pixel of an image.

Functions

Function muppiSubC_32f_C1R

![][public]

MUppStatus muppiSubC_32f_C1R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f nConstant, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiSubC_32f_C1IR

![][public]

MUppStatus muppiSubC_32f_C1IR(const MUpp32f nConstant, MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiSubC_32f_C3R

![][public]

MUppStatus muppiSubC_32f_C3R(const MUpp32f *pSrc1, int nSrc1Step, const MUpp32f aConstants[3], MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f * pSrc1
  • int nSrc1Step
  • const MUpp32f aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiSubC_32f_C3IR

![][public]

MUppStatus muppiSubC_32f_C3IR(const MUpp32f aConstants[3], MUpp32f *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32f aConstants
  • int nSrcDstStep

Return type: MUppStatus


Sum

Primitives for computing the sum of all the pixel values in an image.


Swap Channels

Functions for swapping and duplicating channels in multiple channel images. The methods support arbitrary permutations of the original channels, including replication and setting one or more channels to a constant value.

Functions

Function muppiSwapChannels_8u_C4C3R

![][public]

MUppStatus muppiSwapChannels_8u_C4C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const int aDstOrder[3])

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const int aDstOrder

Return type: MUppStatus

Function muppiSwapChannels_8u_C3C4R

![][public]

MUppStatus muppiSwapChannels_8u_C3C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, const int aDstOrder[4], const MUpp8u nValue)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep
  • const int aDstOrder
  • const MUpp8u nValue

Return type: MUppStatus

Function muppiSwapChannels_32f_C4C3R

![][public]

MUppStatus muppiSwapChannels_32f_C4C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const int aDstOrder[3])

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const int aDstOrder

Return type: MUppStatus

Function muppiSwapChannels_32f_C3C4R

![][public]

MUppStatus muppiSwapChannels_32f_C3C4R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const int aDstOrder[4], const MUpp32f nValue)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const int aDstOrder
  • const MUpp32f nValue

Return type: MUppStatus


Threshold and Compare

Operations

Methods for pixel-wise threshold and compare operations.

These functions can be found in the muppitc library. Linking to only the sub-libraries that you use can significantly save link time, application load time, and MUSA runtime startup time when using dynamic libraries.

Submodules


Threshold Greater Than

Operations Threshold greater than image pixels.

Common parameters for muppiThreshold_GT non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


Threshold Greater

Than Value Operations Replace image pixels greater than threshold with a value.

Common parameters for muppiThreshold_GTVal non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • nValue: The threshold replacement value.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


Threshold Less Than Operations

Threshold less than image pixels.

Common parameters for muppiThreshold_LT non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


Image_threshold_less_than_value_greater_than_value_operations

Threshold Less Than Value Or Greater Than Value Operations Replace image pixels less than thresholdLT or greater than thresholdGT with with valueLT or valueGT respectively.

Common parameters for muppiThreshold_LTValGTVal non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThresholdLT: The thresholdLT value.
  • nValueLT: The thresholdLT replacement value.
  • nThresholdGT: The thresholdGT value.
  • nValueGT: The thresholdGT replacement value.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


Threshold Less Than

Value Operations Replace image pixels less than threshold with a value.

Common parameters for muppiThreshold_LTVal non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • nValue: The threshold replacement value.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes.


Threshold Operations

Threshold image pixels.

Common parameters for muppiThreshold non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • eComparisonOperation: The type of comparison operation to be used. The only valid values are: MUPP_CMP_LESS and MUPP_CMP_GREATER.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, or MUPP_NOT_SUPPORTED_MODE_ERROR if an invalid comparison operation type is specified.

Functions

Function muppiThreshold_32f_C1R_Ctx

![][public]

MUppStatus muppiThreshold_32f_C1R_Ctx(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp32f nThreshold, MUppCmpOp eComparisonOperation, MUppStreamContext muppStreamCtx)

1 channel 32-bit floating point threshold. If for a comparison operations OP the predicate (sourcePixel OP nThreshold) is true, the pixel is set to nThreshold, otherwise it is set to sourcePixel.

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

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f nThreshold

Return type: MUppStatus

Function muppiThreshold_32f_C1R

![][public]

MUppStatus muppiThreshold_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI, const MUpp32f nThreshold, MUppCmpOp eComparisonOperation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const MUpp32f nThreshold

Return type: MUppStatus


Threshold Value Operations

Replace thresholded image pixels with a value.

Common parameters for muppiThreshold_Val non-inplace and inplace functions include:

Parameters:

  • pSrcDst: in_place_image_pointer for inplace functions.
  • nSrcDstStep: in_place_image_line_step for inplace functions.
  • pSrc: source_image_pointer for non-inplace functions.
  • nSrcStep: source_image_line_step for non-inplace functions.
  • pDst: destination_image_pointer for non-inplace functions.
  • nDstStep: destination_image_line_step for non-inplace functions.
  • oSizeROI: roi_specification.
  • nThreshold: The threshold value.
  • nValue: The threshold replacement value.
  • eComparisonOperation: The type of comparison operation to be used. The only valid values are: MUPP_CMP_LESS and MUPP_CMP_GREATER.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, or MUPP_NOT_SUPPORTED_MODE_ERROR if an invalid comparison operation type is specified.


Thresholding Operations

Various types of image thresholding operations.

Submodules


Transpose

Functions for transposing images of various types. Like matrix transpose, image transpose is a mirror along the image's diagonal (upper-left to lower-right corner).

Common parameters for muppiTranspose functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: Pointer to the destination ROI.
  • nDstStep: destination_image_line_step.
  • oSrcROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Functions

Function muppiTranspose_8u_C1R

![][public]

MUppStatus muppiTranspose_8u_C1R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSrcROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiTranspose_8u_C3R

![][public]

MUppStatus muppiTranspose_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSrcROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiTranspose_32f_C1R

![][public]

MUppStatus muppiTranspose_32f_C1R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSrcROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiTranspose_32f_C3R

![][public]

MUppStatus muppiTranspose_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSrcROI)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


Xor

Pixel by pixel logical exclusive or of images.

Functions

Function muppiXor_8u_C1R_Ctx

![][public]

MUppStatus muppiXor_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C1R

![][public]

MUppStatus muppiXor_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C1IR_Ctx

![][public]

MUppStatus muppiXor_8u_C1IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_8u_C1IR

![][public]

MUppStatus muppiXor_8u_C1IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_8u_C3R_Ctx

![][public]

MUppStatus muppiXor_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C3R

![][public]

MUppStatus muppiXor_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C3IR_Ctx

![][public]

MUppStatus muppiXor_8u_C3IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_8u_C3IR

![][public]

MUppStatus muppiXor_8u_C3IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_8u_C4R_Ctx

![][public]

MUppStatus muppiXor_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C4R

![][public]

MUppStatus muppiXor_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u *pSrc2, int nSrc2Step, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_8u_C4IR_Ctx

![][public]

MUppStatus muppiXor_8u_C4IR_Ctx(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_8u_C4IR

![][public]

MUppStatus muppiXor_8u_C4IR(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C1R_Ctx

![][public]

MUppStatus muppiXor_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C1R

![][public]

MUppStatus muppiXor_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C1IR_Ctx

![][public]

MUppStatus muppiXor_16u_C1IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C1IR

![][public]

MUppStatus muppiXor_16u_C1IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C3R_Ctx

![][public]

MUppStatus muppiXor_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C3R

![][public]

MUppStatus muppiXor_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C3IR_Ctx

![][public]

MUppStatus muppiXor_16u_C3IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C3IR

![][public]

MUppStatus muppiXor_16u_C3IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C4R_Ctx

![][public]

MUppStatus muppiXor_16u_C4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C4R

![][public]

MUppStatus muppiXor_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u *pSrc2, int nSrc2Step, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_16u_C4IR_Ctx

![][public]

MUppStatus muppiXor_16u_C4IR_Ctx(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_16u_C4IR

![][public]

MUppStatus muppiXor_16u_C4IR(const MUpp16u *pSrc, int nSrcStep, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C1R_Ctx

![][public]

MUppStatus muppiXor_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C1R

![][public]

MUppStatus muppiXor_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C1IR_Ctx

![][public]

MUppStatus muppiXor_32s_C1IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C1IR

![][public]

MUppStatus muppiXor_32s_C1IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C3R_Ctx

![][public]

MUppStatus muppiXor_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C3R

![][public]

MUppStatus muppiXor_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C3IR_Ctx

![][public]

MUppStatus muppiXor_32s_C3IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C3IR

![][public]

MUppStatus muppiXor_32s_C3IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C4R_Ctx

![][public]

MUppStatus muppiXor_32s_C4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical exclusive or. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • pSrc2: source_image_pointer.
  • nSrc2Step: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C4R

![][public]

MUppStatus muppiXor_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s *pSrc2, int nSrc2Step, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s * pSrc2
  • int nSrc2Step
  • int nDstStep

Return type: MUppStatus

Function muppiXor_32s_C4IR_Ctx

![][public]

MUppStatus muppiXor_32s_C4IR_Ctx(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel in place image logical exclusive or. Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pSrcDst: in_place_image_pointer.
  • nSrcDstStep: in_place_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXor_32s_C4IR

![][public]

MUppStatus muppiXor_32s_C4IR(const MUpp32s *pSrc, int nSrcStep, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc
  • int nSrcStep
  • int nSrcDstStep

Return type: MUppStatus


XorC

Pixel by pixel logical exclusive or of an image with a constant.

Functions

Function muppiXorC_8u_C1R_Ctx

![][public]

MUppStatus muppiXorC_8u_C1R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 8-bit unsigned char channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C1R

![][public]

MUppStatus muppiXorC_8u_C1R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u nConstant, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C1IR

![][public]

MUppStatus muppiXorC_8u_C1IR(const MUpp8u nConstant, MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_8u_C3R_Ctx

![][public]

MUppStatus muppiXorC_8u_C3R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 8-bit unsigned char channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C3R

![][public]

MUppStatus muppiXorC_8u_C3R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C3IR

![][public]

MUppStatus muppiXorC_8u_C3IR(const MUpp8u aConstants[3], MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_8u_AC4R_Ctx

![][public]

MUppStatus muppiXorC_8u_AC4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical exclusive or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_AC4R

![][public]

MUppStatus muppiXorC_8u_AC4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C4R_Ctx

![][public]

MUppStatus muppiXorC_8u_C4R_Ctx(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 8-bit unsigned char channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C4R

![][public]

MUppStatus muppiXorC_8u_C4R(const MUpp8u *pSrc1, int nSrc1Step, const MUpp8u aConstants[4], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc1
  • int nSrc1Step
  • const MUpp8u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_8u_C4IR

![][public]

MUppStatus muppiXorC_8u_C4IR(const MUpp8u aConstants[4], MUpp8u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_16u_C1R_Ctx

![][public]

MUppStatus muppiXorC_16u_C1R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 16-bit unsigned short channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C1R

![][public]

MUppStatus muppiXorC_16u_C1R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u nConstant, MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C1IR

![][public]

MUppStatus muppiXorC_16u_C1IR(const MUpp16u nConstant, MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_16u_C3R_Ctx

![][public]

MUppStatus muppiXorC_16u_C3R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 16-bit unsigned short channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C3R

![][public]

MUppStatus muppiXorC_16u_C3R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C3IR

![][public]

MUppStatus muppiXorC_16u_C3IR(const MUpp16u aConstants[3], MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_16u_AC4R_Ctx

![][public]

MUppStatus muppiXorC_16u_AC4R_Ctx(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 16-bit unsigned short channel image logical exclusive or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_AC4R

![][public]

MUppStatus muppiXorC_16u_AC4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[3], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C4R

![][public]

MUppStatus muppiXorC_16u_C4R(const MUpp16u *pSrc1, int nSrc1Step, const MUpp16u aConstants[4], MUpp16u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u * pSrc1
  • int nSrc1Step
  • const MUpp16u aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_16u_C4IR

![][public]

MUppStatus muppiXorC_16u_C4IR(const MUpp16u aConstants[4], MUpp16u *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp16u aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_32s_C1R_Ctx

![][public]

MUppStatus muppiXorC_32s_C1R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

One 32-bit signed integer channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • nConstant: Constant.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C1R

![][public]

MUppStatus muppiXorC_32s_C1R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s nConstant, MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s nConstant
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C1IR

![][public]

MUppStatus muppiXorC_32s_C1IR(const MUpp32s nConstant, MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s nConstant
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_32s_C3R_Ctx

![][public]

MUppStatus muppiXorC_32s_C3R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Three 32-bit signed integer channel image logical exclusive or with constant. Parameters:

  • pSrc1: source_image_pointer.
  • nSrc1Step: source_image_line_step.
  • aConstants: fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C3R

![][public]

MUppStatus muppiXorC_32s_C3R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C3IR

![][public]

MUppStatus muppiXorC_32s_C3IR(const MUpp32s aConstants[3], MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s aConstants
  • int nSrcDstStep

Return type: MUppStatus

Function muppiXorC_32s_AC4R_Ctx

![][public]

MUppStatus muppiXorC_32s_AC4R_Ctx(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI, MUppStreamContext muppStreamCtx)

Four 32-bit signed integer channel image logical exclusive or with constant with unmodified alpha. Parameters:

  • pSrc1: source_image_pointer. nSrc1Step source_image_line_step. aConstants fixed size array of constant values, one per channel.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_AC4R

![][public]

MUppStatus muppiXorC_32s_AC4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[3], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C4R

![][public]

MUppStatus muppiXorC_32s_C4R(const MUpp32s *pSrc1, int nSrc1Step, const MUpp32s aConstants[4], MUpp32s *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s * pSrc1
  • int nSrc1Step
  • const MUpp32s aConstants
  • int nDstStep

Return type: MUppStatus

Function muppiXorC_32s_C4IR

![][public]

MUppStatus muppiXorC_32s_C4IR(const MUpp32s aConstants[4], MUpp32s *pSrcDst, int nSrcDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp32s aConstants
  • int nSrcDstStep

Return type: MUppStatus


LabToBGR

Lab to BGR color conversion.

This is how MUPP converts Lab to gamma corrected BGR or RGB using the CIE Lab D65 white point with a Y luminance of 1.0. The code uses powf() the 32 bit floating point power math function.

// use CIE Lab chromaticity coordinates #define nCIE_LAB_D65_xn 0.950455F #define nCIE_LAB_D65_yn 1.0F #define nCIE_LAB_D65_zn 1.088753F // First convert Lab back to original range then to CIE XYZ MUpp32f nL = (MUpp32f)L * 100.0F * 0.003921569F; // / 255.0F MUpp32f nA = (MUpp32f)a - 128.0F; MUpp32f nB = (MUpp32f)b - 128.0F; MUpp32f nP = (nL + 16.0F) * 0.008621F; // / 116.0F MUpp32f nNormalizedY = nP * nP * nP; // powf(nP, 3.0F); MUpp32f nNormalizedX = nCIE_LAB_D65_xn * powf((nP + nA * 0.002F), 3.0F); // / 500.0F MUpp32f nNormalizedZ = nCIE_LAB_D65_zn * powf((nP - nB * 0.005F), 3.0F); // / 200.0F MUpp32f nR = 3.240479F * nNormalizedX - 1.53715F

  • nNormalizedY - 0.498535F * nNormalizedZ; if (nR > 1.0F) nR = 1.0F; MUpp32f nG = -0.969256F * nNormalizedX + 1.875991F * nNormalizedY + 0.041556F * nNormalizedZ; if (nG > 1.0F) nG = 1.0F; nB = 0.055648F * nNormalizedX - 0.204043F * nNormalizedY + 1.057311F * nNormalizedZ; if (nB > 1.0F) nB = 1.0F; R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG * 255.0F); B = (MUpp8u)(nB
  • 255.0F);

LUVToRGB

LUV to RGB color conversion.

Here is how MUPP converts CIE LUV to gamma corrected RGB or BGR using the CIE XYZ D65 white point with a Y luminance of 1.0. The code uses powf() the 32 bit floating point power math function.

// use CIE D65 chromaticity coordinates #define nCIE_XYZ_D65_xn 0.312713F #define nCIE_XYZ_D65_yn 0.329016F #define nn_DIVISOR (-2.0F * nCIE_XYZ_D65_xn + 12.0F * nCIE_XYZ_D65_yn

  • 3.0F) #define nun (4.0F * nCIE_XYZ_D65_xn / nn_DIVISOR) #define nvn (9.0F * nCIE_XYZ_D65_yn / nn_DIVISOR)

// First convert normalized LUV back to original CIE LUV range MUpp32f nL = (MUpp32f)L * 100.0F * 0.003921569F; // / 255.0F MUpp32f nU = ((MUpp32f)U * 354.0F * 0.003921569F) - 134.0F; MUpp32f nV = ((MUpp32f)V * 262.0F * 0.003921569F) - 140.0F; // Now convert LUV to CIE XYZ MUpp32f nTemp = 13.0F * nL; MUpp32f nu = nU / nTemp + nun; MUpp32f nv = nV / nTemp + nvn; MUpp32f nNormalizedY; if (nL > 7.9996248F) { nNormalizedY = (nL + 16.0F) * 0.008621F; // / 116.0F nNormalizedY = powf(nNormalizedY, 3.0F); } else { nNormalizedY = nL * 0.001107F; // / 903.3F } MUpp32f nNormalizedX = (-9.0F * nNormalizedY * nu) / ((nu - 4.0F) * nv - nu

  • nv); MUpp32f nNormalizedZ = (9.0F * nNormalizedY - 15.0F * nv * nNormalizedY - nv * nNormalizedX) / (3.0F * nv); MUpp32f nR = 3.240479F * nNormalizedX
  • 1.53715F * nNormalizedY - 0.498535F * nNormalizedZ; if (nR > 1.0F) nR = 1.0F; if (nR < 0.0F) nR = 0.0F; MUpp32f nG = -0.969256F * nNormalizedX
  • 1.875991F * nNormalizedY + 0.041556F * nNormalizedZ; if (nG > 1.0F) nG = 1.0F; if (nG < 0.0F) nG = 0.0F; MUpp32f nB = 0.055648F * nNormalizedX - 0.204043F * nNormalizedY + 1.057311F * nNormalizedZ; if (nB > 1.0F) nB = 1.0F; if (nB < 0.0F) nB = 0.0F; R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG
  • 255.0F); B = (MUpp8u)(nB * 255.0F);

MirrorBatch

Mirrors batches of images horizontally, vertically or diagonally.

MirrorBatch generally takes the same parameter list as Mirror except that there is a list of N instances of those parameters (N > 1) and that list is passed in device memory. 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 and a single mirror flag which are 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.

Common parameters for muppiMirrorBatch non-inplace and inplace functions include:

Parameters:

  • oSizeROI: roi_specification.
  • flip: Specifies the axis about which the images are to be mirrored.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiMirrorBatchCXR structures.
  • nBatchSize: Number of MUppiMirrorBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Mirror Error Codes


Basic MUPP Data Types

Definitions of basic types available in the library.

Enumeration types

Enumeration type MUppiAxis

![][public]

Definition: muppdefs.h (line 438)

enum MUppiAxis { MUPP_HORIZONTAL_AXIS, MUPP_VERTICAL_AXIS, MUPP_BOTH_AXIS }

Enumerator MUPP_HORIZONTAL_AXIS

Enumerator MUPP_VERTICAL_AXIS

Enumerator MUPP_BOTH_AXIS

Enumeration type MUppCmpOp

![][public]

Definition: muppdefs.h (line 444)

enum MUppCmpOp { MUPP_CMP_LESS, MUPP_CMP_LESS_EQ, MUPP_CMP_EQ, MUPP_CMP_GREATER_EQ, MUPP_CMP_GREATER }

Enumerator MUPP_CMP_LESS

Enumerator MUPP_CMP_LESS_EQ

Enumerator MUPP_CMP_EQ

Enumerator MUPP_CMP_GREATER_EQ

Enumerator MUPP_CMP_GREATER

Enumeration type MUppRoundMode

![][public]

Definition: muppdefs.h (line 466)

enum MUppRoundMode { MUPP_RND_NEAR, MUPP_ROUND_NEAREST_TIES_TO_EVEN = MUPP_RND_NEAR, MUPP_RND_FINANCIAL, MUPP_ROUND_NEAREST_TIES_AWAY_FROM_ZERO = MUPP_RND_FINANCIAL, MUPP_RND_ZERO, MUPP_ROUND_TOWARD_ZERO = MUPP_RND_ZERO }

Rounding Modes

The enumerated rounding modes are used by a large number of MUPP primitives to allow the user to specify the method by which fractional values are converted to integer values. Also see rounding_modes.

For MUPP release 1.0 new names for the three rounding modes are introduced that are based on the naming conventions for rounding modes set forth in the IEEE-754 floating-point standard. Developers are encouraged to use the new, longer names to be future proof as the legacy names will be deprecated in subsequent MUPP releases.

Enumerator MUPP_RND_NEAR

Round to the nearest even integer. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. <integer>.5) are rounded to the closest even integer. E.g.

  • roundNear(0.5) = 0

  • roundNear(0.6) = 1

  • roundNear(1.5) = 2

  • roundNear(-1.5) = -2

Enumerator MUPP_ROUND_NEAREST_TIES_TO_EVEN

Alias name for MUPP_RND_NEAR.

Enumerator MUPP_RND_FINANCIAL

Round according to financial rule. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. <integer>.5) are rounded away from zero. E.g.

  • roundFinancial(0.4) = 0

  • roundFinancial(0.5) = 1

  • roundFinancial(-1.5) = -2

Enumerator MUPP_ROUND_NEAREST_TIES_AWAY_FROM_ZERO

Alias name for MUPP_RND_FINANCIAL.

Enumerator MUPP_RND_ZERO

Round towards zero (truncation). All fractional numbers of the form <integer>.<decimals> are truncated to <integer>.

  • roundZero(1.5) = 1

  • roundZero(1.9) = 1

  • roundZero(-2.5) = -2

Enumerator MUPP_ROUND_TOWARD_ZERO

Alias name for MUPP_RND_ZERO.

Enumeration type MUppiBorderType

![][public]

Definition: muppdefs.h (line 513)

enum MUppiBorderType { MUPP_BORDER_UNDEFINED = 0, MUPP_BORDER_NONE = MUPP_BORDER_UNDEFINED, MUPP_BORDER_CONSTANT = 1, MUPP_BORDER_REPLICATE = 2, MUPP_BORDER_WRAP = 3, MUPP_BORDER_MIRROR = 4 }

Enumerator MUPP_BORDER_UNDEFINED

Enumerator MUPP_BORDER_NONE

Enumerator MUPP_BORDER_CONSTANT

Enumerator MUPP_BORDER_REPLICATE

Enumerator MUPP_BORDER_WRAP

Enumerator MUPP_BORDER_MIRROR

Enumeration type MUppHintAlgorithm

![][public]

Definition: muppdefs.h (line 522)

enum MUppHintAlgorithm { MUPP_ALG_HINT_NONE, MUPP_ALG_HINT_FAST, MUPP_ALG_HINT_ACCURATE }

Enumerator MUPP_ALG_HINT_NONE

Enumerator MUPP_ALG_HINT_FAST

Enumerator MUPP_ALG_HINT_ACCURATE

Enumeration type MUppiAlphaOp

![][public]

Definition: muppdefs.h (line 532)

enum MUppiAlphaOp { MUPPI_OP_ALPHA_OVER, MUPPI_OP_ALPHA_IN, MUPPI_OP_ALPHA_OUT, MUPPI_OP_ALPHA_ATOP, MUPPI_OP_ALPHA_XOR, MUPPI_OP_ALPHA_PLUS, MUPPI_OP_ALPHA_OVER_PREMUL, MUPPI_OP_ALPHA_IN_PREMUL, MUPPI_OP_ALPHA_OUT_PREMUL, MUPPI_OP_ALPHA_ATOP_PREMUL, MUPPI_OP_ALPHA_XOR_PREMUL, MUPPI_OP_ALPHA_PLUS_PREMUL, MUPPI_OP_ALPHA_PREMUL }

Enumerator MUPPI_OP_ALPHA_OVER

Enumerator MUPPI_OP_ALPHA_IN

Enumerator MUPPI_OP_ALPHA_OUT

Enumerator MUPPI_OP_ALPHA_ATOP

Enumerator MUPPI_OP_ALPHA_XOR

Enumerator MUPPI_OP_ALPHA_PLUS

Enumerator MUPPI_OP_ALPHA_OVER_PREMUL

Enumerator MUPPI_OP_ALPHA_IN_PREMUL

Enumerator MUPPI_OP_ALPHA_OUT_PREMUL

Enumerator MUPPI_OP_ALPHA_ATOP_PREMUL

Enumerator MUPPI_OP_ALPHA_XOR_PREMUL

Enumerator MUPPI_OP_ALPHA_PLUS_PREMUL

Enumerator MUPPI_OP_ALPHA_PREMUL

Enumeration type MUppsZCType

![][public]

Definition: muppdefs.h (line 585)

enum MUppsZCType { muppZCR, muppZCXor, muppZCC }

Enumerator muppZCR

sign change

Enumerator muppZCXor

sign change XOR

Enumerator muppZCC

sign change count_0

Enumeration type MUppiHuffmanTableType

![][public]

Definition: muppdefs.h (line 591)

enum MUppiHuffmanTableType { muppiDCTable, muppiACTable }

Enumerator muppiDCTable

DC Table

Enumerator muppiACTable

AC Table

Enumeration type MUppiNorm

![][public]

Definition: muppdefs.h (line 596)

enum MUppiNorm { muppiNormMinMax = -1, muppiNormInf = 0, muppiNormL1 = 1, muppiNormL2 = 2 }

Enumerator muppiNormMinMax

MinMax

Enumerator muppiNormInf

maximum

Enumerator muppiNormL1

sum

Enumerator muppiNormL2

square root of sum of squares

Enumeration type MUppiWatershedSegmentBoundaryType

![][public]

Definition: muppdefs.h (line 751)

enum MUppiWatershedSegmentBoundaryType { MUPP_WATERSHED_SEGMENT_BOUNDARIES_NONE, MUPP_WATERSHED_SEGMENT_BOUNDARIES_BLACK, MUPP_WATERSHED_SEGMENT_BOUNDARIES_WHITE, MUPP_WATERSHED_SEGMENT_BOUNDARIES_CONTRAST, MUPP_WATERSHED_SEGMENT_BOUNDARIES_ONLY }

Provides control of the type of segment boundaries, if any, added to the image generated by the watershed segmentation function.

Enumerator MUPP_WATERSHED_SEGMENT_BOUNDARIES_NONE

Enumerator MUPP_WATERSHED_SEGMENT_BOUNDARIES_BLACK

Enumerator MUPP_WATERSHED_SEGMENT_BOUNDARIES_WHITE

Enumerator MUPP_WATERSHED_SEGMENT_BOUNDARIES_CONTRAST

Enumerator MUPP_WATERSHED_SEGMENT_BOUNDARIES_ONLY

Typedefs

Typedef MUpp8u

![][public]

Definition: muppdefs.h (line 281)

typedef unsigned char MUpp8u

8-bit unsigned chars

Return type: unsigned char

Typedef MUpp8s

![][public]

Definition: muppdefs.h (line 282)

typedef signed char MUpp8s

8-bit signed chars

Return type: signed char

Typedef MUpp16u

![][public]

Definition: muppdefs.h (line 283)

typedef unsigned short MUpp16u

16-bit unsigned integers

Return type: unsigned short

Typedef MUpp16s

![][public]

Definition: muppdefs.h (line 284)

typedef short MUpp16s

16-bit signed integers

Return type: short

Typedef MUpp32u

![][public]

Definition: muppdefs.h (line 285)

typedef unsigned int MUpp32u

32-bit unsigned integers

Return type: unsigned int

Typedef MUpp32s

![][public]

Definition: muppdefs.h (line 286)

typedef int MUpp32s

32-bit signed integers

Return type: int

Typedef MUpp64u

![][public]

Definition: muppdefs.h (line 287)

typedef unsigned long long MUpp64u

64-bit unsigned integers

Return type: unsigned long long

Typedef MUpp64s

![][public]

Definition: muppdefs.h (line 288)

typedef long long MUpp64s

64-bit signed integers

Return type: long long

Typedef MUpp32f

![][public]

Definition: muppdefs.h (line 289)

typedef float MUpp32f

32-bit (IEEE) floating-point numbers

Return type: float

Typedef MUpp64f

![][public]

Definition: muppdefs.h (line 290)

typedef double MUpp64f

64-bit floating-point numbers

Return type: double

Typedef MUpp32uc

![][public]

Definition: muppdefs.h (line 329)

typedef struct MUPP_ALIGN_8 MUpp32uc

Complex Number This struct represents an unsigned int complex number.

Return type: struct MUPP_ALIGN_8

Typedef MUpp32sc

![][public]

Definition: muppdefs.h (line 338)

typedef struct MUPP_ALIGN_8 MUpp32sc

Complex Number This struct represents a signed int complex number.

Return type: struct MUPP_ALIGN_8

Typedef MUpp32fc

![][public]

Definition: muppdefs.h (line 347)

typedef struct MUPP_ALIGN_8 MUpp32fc

Complex Number This struct represents a single floating-point complex number.

Return type: struct MUPP_ALIGN_8

Typedef MUpp64sc

![][public]

Definition: muppdefs.h (line 356)

typedef struct MUPP_ALIGN_16 MUpp64sc

Complex Number This struct represents a long long complex number.

Return type: struct MUPP_ALIGN_16

Typedef MUpp64fc

![][public]

Definition: muppdefs.h (line 365)

typedef struct MUPP_ALIGN_16 MUpp64fc

Complex Number This struct represents a double floating-point complex number.

Return type: struct MUPP_ALIGN_16

Macros

Macro MUPP_MIN_8U

![][public]

#define MUPP_MIN_8U (0)

Minimum 8-bit unsigned integer

Macro MUPP_MAX_8U

![][public]

#define MUPP_MAX_8U (255)

Maximum 8-bit unsigned integer

Macro MUPP_MIN_16U

![][public]

#define MUPP_MIN_16U (0)

Minimum 16-bit unsigned integer

Macro MUPP_MAX_16U

![][public]

#define MUPP_MAX_16U (65535)

Maximum 16-bit unsigned integer

Macro MUPP_MIN_32U

![][public]

#define MUPP_MIN_32U (0)

Minimum 32-bit unsigned integer

Macro MUPP_MAX_32U

![][public]

#define MUPP_MAX_32U (4294967295U)

Maximum 32-bit unsigned integer

Macro MUPP_MIN_64U

![][public]

#define MUPP_MIN_64U (0)

Minimum 64-bit unsigned integer

Macro MUPP_MAX_64U

![][public]

#define MUPP_MAX_64U (18446744073709551615ULL)

Maximum 64-bit unsigned integer

Macro MUPP_MIN_8S

![][public]

#define MUPP_MIN_8S (-127 - 1)

Minimum 8-bit signed integer

Macro MUPP_MAX_8S

![][public]

#define MUPP_MAX_8S (127)

Maximum 8-bit signed integer

Macro MUPP_MIN_16S

![][public]

#define MUPP_MIN_16S (-32767 - 1)

Minimum 16-bit signed integer

Macro MUPP_MAX_16S

![][public]

#define MUPP_MAX_16S (32767)

Maximum 16-bit signed integer

Macro MUPP_MIN_32S

![][public]

#define MUPP_MIN_32S (-2147483647 - 1)

Minimum 32-bit signed integer

Macro MUPP_MAX_32S

![][public]

#define MUPP_MAX_32S (2147483647)

Maximum 32-bit signed integer

Macro MUPP_MAX_64S

![][public]

#define MUPP_MAX_64S (9223372036854775807LL)

Maximum 64-bit signed integer

Macro MUPP_MIN_64S

![][public]

#define MUPP_MIN_64S (-9223372036854775807LL - 1)

Minimum 64-bit signed integer Smallest positive 32-bit floating point value

Macro MUPP_MINABS_32F

![][public]

#define MUPP_MINABS_32F (1.175494351e-38f)

Largest positive 32-bit floating point value

Macro MUPP_MAXABS_32F

![][public]

#define MUPP_MAXABS_32F (3.402823466e+38f)

Smallest positive 64-bit floating point value

Macro MUPP_MINABS_64F

![][public]

#define MUPP_MINABS_64F (2.2250738585072014e-308)

Largest positive 64-bit floating point value

Macro MUPP_MAXABS_64F

![][public]

#define MUPP_MAXABS_64F (1.7976931348623158e+308)

Macro MUPP_HOG_MAX_CELL_SIZE

![][public]

#define MUPP_HOG_MAX_CELL_SIZE (16)

max horizontal/vertical pixel size of cell. <br/>

Macro MUPP_HOG_MAX_BLOCK_SIZE

![][public]

#define MUPP_HOG_MAX_BLOCK_SIZE (64)

max horizontal/vertical pixel size of block. <br/>

Macro MUPP_HOG_MAX_BINS_PER_CELL

![][public]

#define MUPP_HOG_MAX_BINS_PER_CELL (16)

max number of histogram bins.

Macro MUPP_HOG_MAX_CELLS_PER_DESCRIPTOR

![][public]

#define MUPP_HOG_MAX_CELLS_PER_DESCRIPTOR (256)

max number of cells in a descriptor window. <br/>

Macro MUPP_HOG_MAX_OVERLAPPING_BLOCKS_PER_DESCRIPTOR

![][public]

#define MUPP_HOG_MAX_OVERLAPPING_BLOCKS_PER_DESCRIPTOR (256)

max number of overlapping blocks in a descriptor window. <br/>

Macro MUPP_HOG_MAX_DESCRIPTOR_LOCATIONS_PER_CALL

![][public]

#define MUPP_HOG_MAX_DESCRIPTOR_LOCATIONS_PER_CALL (128)

max number of descriptor window locations per function call. <br/>

Macro MUPP_CONTOUR_DIRECTION_SOUTH_EAST

![][public]

#define MUPP_CONTOUR_DIRECTION_SOUTH_EAST 1

Provides contour (boundary) direction info of uniquely labeled pixel regions returned by CompressedLabelMarkersUF function.

Macro MUPP_CONTOUR_DIRECTION_SOUTH

![][public]

#define MUPP_CONTOUR_DIRECTION_SOUTH 2

Macro MUPP_CONTOUR_DIRECTION_SOUTH_WEST

![][public]

#define MUPP_CONTOUR_DIRECTION_SOUTH_WEST 4

Macro MUPP_CONTOUR_DIRECTION_WEST

![][public]

#define MUPP_CONTOUR_DIRECTION_WEST 8

Macro MUPP_CONTOUR_DIRECTION_EAST

![][public]

#define MUPP_CONTOUR_DIRECTION_EAST 16

Macro MUPP_CONTOUR_DIRECTION_NORTH_EAST

![][public]

#define MUPP_CONTOUR_DIRECTION_NORTH_EAST 32

Macro MUPP_CONTOUR_DIRECTION_NORTH

![][public]

#define MUPP_CONTOUR_DIRECTION_NORTH 64

Macro MUPP_CONTOUR_DIRECTION_NORTH_WEST

![][public]

#define MUPP_CONTOUR_DIRECTION_NORTH_WEST 128

Macro MUPP_CONTOUR_DIRECTION_ANY_NORTH

![][public]

#define MUPP_CONTOUR_DIRECTION_ANY_NORTH MUPP_CONTOUR_DIRECTION_NORTH_EAST | MUPP_CONTOUR_DIRECTION_NORTH |
MUPP_CONTOUR_DIRECTION_NORTH_WEST

Macro MUPP_CONTOUR_DIRECTION_ANY_WEST

![][public]

#define MUPP_CONTOUR_DIRECTION_ANY_WEST MUPP_CONTOUR_DIRECTION_NORTH_WEST | MUPP_CONTOUR_DIRECTION_WEST |
MUPP_CONTOUR_DIRECTION_SOUTH_WEST

Macro MUPP_CONTOUR_DIRECTION_ANY_SOUTH

![][public]

#define MUPP_CONTOUR_DIRECTION_ANY_SOUTH MUPP_CONTOUR_DIRECTION_SOUTH_EAST | MUPP_CONTOUR_DIRECTION_SOUTH |
MUPP_CONTOUR_DIRECTION_SOUTH_WEST

Macro MUPP_CONTOUR_DIRECTION_ANY_EAST

![][public]

#define MUPP_CONTOUR_DIRECTION_ANY_EAST MUPP_CONTOUR_DIRECTION_NORTH_EAST | MUPP_CONTOUR_DIRECTION_EAST |
MUPP_CONTOUR_DIRECTION_SOUTH_EAST


MUPP Image Processing

The set of image processing functions available in the library.

Submodules


MUPP Signal Processing

The set of signal processing functions available in the library.

Submodules


NV12ToBGR

NV12 to BGR color conversion.

Functions

Function muppiNV12ToBGR_8u_P2C3R

![][public]

MUppStatus muppiNV12ToBGR_8u_P2C3R(const MUpp8u *const pSrc[2], int rSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


NV12ToRGB

NV12 to RGB color conversion.

Functions

Function muppiNV12ToRGB_8u_P2C3R

![][public]

MUppStatus muppiNV12ToRGB_8u_P2C3R(const MUpp8u *const pSrc[2], int rSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


NV21ToBGR

NV21 to BGR color conversion.


NV21ToRGB

NV21 to RGB color conversion.


Perspective Transform

Transforms (warps) an image based on a perspective transform.

The perspective transform is given as a formula {"type":"element","name":"formula","attributes":{"id":"37"},"children":[{"type":"text","text":"$3\\times 3$"}]} matrix C. A pixel location formula {"type":"element","name":"formula","attributes":{"id":"25"},"children":[{"type":"text","text":"$(x, y)$"}]} in the source image is mapped to the location formula {"type":"element","name":"formula","attributes":{"id":"26"},"children":[{"type":"text","text":"$(x', y')$"}]} in the destination image. The destination image coorodinates are computed as follows: formula {"type":"element","name":"formula","attributes":{"id":"38"},"children":[{"type":"text","text":"\\[\n x' = \\frac{c_{00} * x + c_{01} * y + c_{02}}{c_{20} * x + c_{21} * y +\nc_{22}} \\qquad\n y' = \\frac{c_{10} * x + c_{11} * y + c_{12}}{c_{20} * x + c_{21} * y +\nc_{22}}\n \\]"}]} formula {"type":"element","name":"formula","attributes":{"id":"39"},"children":[{"type":"text","text":"\\[\n C = \\left[ \\matrix{c_{00} & c_{01} & c_{02} \\cr\n c_{10} & c_{11} & c_{12} \\cr\n c_{20} & c_{21} & c_{22} } \\right]\n \\]"}]}

Common parameters for muppiWarpPerspective packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Perspective transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes

Common parameters for muppiWarpPerspective planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aCoeffs: Perspective transform coefficients.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes

Functions

Function muppiWarpPerspective_32f_C1R

![][public]

MUppStatus muppiWarpPerspective_32f_C1R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, const double aCoeffs[3][3], int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const double aCoeffs
  • int eInterpolation

Return type: MUppStatus

Function muppiWarpPerspective_32f_C3R

![][public]

MUppStatus muppiWarpPerspective_32f_C3R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, const double aCoeffs[3][3], int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • const double aCoeffs
  • int eInterpolation

Return type: MUppStatus


Perspective Transform Batch

Details of the warp perspective operation are described above in the WarpPerspective section. WarpPerspectiveBatch generally takes the same parameter list as WarpPerspective except that there is a list of N instances of those parameters (N > 1) and that list is passed in device memory. A convenient data structure is provided that allows for easy initialization of the parameter lists. The aTransformedCoeffs array is for internal use only and should not be directly initialized by the application. The only restriction on these functions is that there is one single source ROI rectangle and one single destination ROI rectangle which are 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. A single set of oSrcRectROI and oDstRectROI values are applied to each source image and destination image in the batch. Source and destination image sizes may vary but oSmallestSrcSize must be set to the smallest source and image size in the batch. The parameters in the MUppiWarpPerspectiveBatchCXR structure represent the corresponding per-image muppiWarpPerspective parameters for each image in the batch. The MUppiWarpPerspectiveBatchCXR array must be in device memory. The muppiWarpPerspectiveBatchInit function MUST be called AFTER the application has initialized the array of MUppiWarpPerspectiveBatchCXR structures and BEFORE calling any of the muppiWarpPerspectiveBatch functions to so that the aTransformedCoeffs array can be internally pre-initialized for each image in the batch. The batch size passed to muppiWarpPerspectiveBatchInit must match the batch size passed to the corresponding warp perspective batch function.

WarpPerspectiveBatch supports the following interpolation modes:

MUPPI_INTER_NN MUPPI_INTER_LINEAR MUPPI_INTER_CUBIC

Codes

The warp perspective primitives return the following error codes:

  • ::MUPP_RECTANGLE_ERROR if either destination ROI width or height is less than 1 pixel.
  • ::MUPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.
  • ::MUPP_SIZE_ERROR if source size width or height is less than 2

pixels.

Common parameters for muppiWarpPerspectiveBatch functions include:

Parameters:

  • oSmallestSrcSize: Size in pixels of the entire smallest source image width and height, may be from different images.
  • oSrcRectROI: Region of interest in the source images.
  • oDstRectROI: Region of interest in the destination images.
  • eInterpolation: The type of eInterpolation to perform resampling. Currently limited to MUPPI_INTER_NN, MUPPI_INTER_LINEAR, or MUPPI_INTER_CUBIC.
  • pBatchList: Device memory pointer to nBatchSize list of MUppiWarpPerspectiveBatchCXR structures.
  • nBatchSize: Number of MUppiWarpPerspectiveBatchCXR structures in this call (must be > 1).
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes


Perspective Transform

Utility Functions The set of perspective transform utility functions.

Functions

Function muppiGetPerspectiveTransform

![][public]

MUppStatus muppiGetPerspectiveTransform(MUppiRect oSrcROI, const double aQuad[4][2], double aCoeffs[3][3])

Calculates perspective transform coefficients given source rectangular ROI and its destination quadrangle projection

Parameters:

  • oSrcROI: Source ROI
  • aQuad: Destination quadrangle
  • aCoeffs: Perspective transform coefficients

Returns:

Error codes:

Parameters:

  • const double aQuad
  • double aCoeffs

Return type: MUppStatus


Quad-Based Affine Transform

Transforms (warps) an image based on an affine transform.

The affine transform is computed such that it maps a quadrilateral in source image space to a quadrilateral in destination image space.

An affine transform is fully determined by the mapping of 3 discrete points. The following primitives compute an affine transformation matrix that maps the first three corners of the source quad are mapped to the first three vertices of the destination image quad. If the fourth vertices do not match the transform, an MUPP_AFFINE_QUAD_INCORRECT_WARNING is returned by the primitive.

Common parameters for muppiWarpAffineQuad packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • aSrcQuad: Source quad.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aDstQuad: Destination quad.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes

Common parameters for muppiWarpAffineQuad planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step. oSrcROI Source ROI
  • aSrcQuad: Source quad.
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • nDstStep: destination_image_line_step. oDstROI Destination ROI
  • aDstQuad: Destination quad.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Affine Transform Error Codes


Quad-Based Perspective Transform

Transforms (warps) an image based on an perspective transform.

The perspective transform is computed such that it maps a quadrilateral in source image space to a quadrilateral in destination image space.

Common parameters for muppiWarpPerspectiveQuad packed pixel functions include:

Parameters:

  • pSrc: source_image_pointer.
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step.
  • oSrcROI: Source ROI.
  • aSrcQuad: Source quad.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Destination ROI.
  • aDstQuad: Destination quad.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes

Common parameters for muppiWarpPerspectiveQuad planar pixel functions include:

Parameters:

  • pSrc: source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • oSrcSize: Size of source image in pixels.
  • nSrcStep: source_image_line_step. oSrcROI Source ROI.
  • aSrcQuad: Source quad.
  • pDst: destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
  • nDstStep: destination_image_line_step. oDstROI Destination ROI.
  • aDstQuad: Destination quad.
  • eInterpolation: Interpolation mode: can be MUPPI_INTER_NN, MUPPI_INTER_LINEAR or MUPPI_INTER_CUBIC.
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Perspective Transform Error Codes


RGBAToRGB

Convert a packed 4 channel RGBA image to a packed 3 channel RGB image. The alpha channel is abandoned. The order of RGB keeps unchanged, which means this API may be used to convert BGRA to BGR.

Functions

Function muppiRGBAToRGB_8u_C4C3R

![][public]

MUppStatus muppiRGBAToRGB_8u_C4C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

4 channel 8-bit unsigned packed RGBA to 3 channel 8-bit unsigned packed RGB conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiRGBAToRGB_32f_C4C3R

![][public]

MUppStatus muppiRGBAToRGB_32f_C4C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

4 channel 32-bit float packed RGBA to 3 channel 32-bit float packed RGB conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


RGBToCbYCr422

RGB to CbYCr422 color conversion.


RGBToHLS

RGB to HLS color conversion.

This is how MUPP converts gamma corrected RGB or BGR to HLS. This code uses the fmaxf() and fminf() 32 bit floating point math functions.

MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nS; MUpp32f nH; // Lightness MUpp32f nMax = fmaxf(nNormalizedR, nNormalizedG); nMax = fmaxf(nMax, nNormalizedB); MUpp32f nMin = fminf(nNormalizedR, nNormalizedG); nMin = fminf(nMin, nNormalizedB); MUpp32f nL = (nMax + nMin) * 0.5F; MUpp32f nDivisor = nMax - nMin; // Saturation if (nDivisor == 0.0F) // achromatics case { nS = 0.0F; nH = 0.0F; } else // chromatics case { if (nL > 0.5F) nS = nDivisor / (1.0F - (nMax + nMin - 1.0F)); else nS = nDivisor / (nMax + nMin); } // Hue MUpp32f nCr = (nMax - nNormalizedR) / nDivisor; MUpp32f nCg = (nMax - nNormalizedG) / nDivisor; MUpp32f nCb = (nMax - nNormalizedB) / nDivisor; if (nNormalizedR == nMax) nH = nCb - nCg; else if (nNormalizedG == nMax) nH = 2.0F + nCr - nCb; else if (nNormalizedB == nMax) nH = 4.0F + nCg - nCr; nH = nH * 0.166667F; // / 6.0F if (nH < 0.0F) nH = nH + 1.0F; H = (MUpp8u)(nH * 255.0F); L = (MUpp8u)(nL * 255.0F); S = (MUpp8u)(nS * 255.0F);


RGBToHSV

RGB to HSV color conversion.

This is how MUPP converts gamma corrected RGB or BGR to HSV. This code uses the fmaxf() and fminf() 32 bit floating point math functions.

MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nS; MUpp32f nH; // Value MUpp32f nV = fmaxf(nNormalizedR, nNormalizedG); nV = fmaxf(nV, nNormalizedB); // Saturation MUpp32f nTemp = fminf(nNormalizedR, nNormalizedG); nTemp = fminf(nTemp, nNormalizedB); MUpp32f nDivisor = nV - nTemp; if (nV == 0.0F) // achromatics case { nS = 0.0F; nH = 0.0F; } else // chromatics case nS = nDivisor / nV; // Hue: MUpp32f nCr = (nV - nNormalizedR) / nDivisor; MUpp32f nCg = (nV - nNormalizedG) / nDivisor; MUpp32f nCb = (nV - nNormalizedB) / nDivisor; if (nNormalizedR == nV) nH = nCb - nCg; else if (nNormalizedG == nV) nH = 2.0F + nCr - nCb; else if (nNormalizedB == nV) nH = 4.0F + nCg - nCr; nH = nH * 0.166667F; // / 6.0F if (nH < 0.0F) nH = nH + 1.0F; H = (MUpp8u)(nH * 255.0F); S = (MUpp8u)(nS * 255.0F); V = (MUpp8u)(nV * 255.0F);


RGBToLUV

RGB to LUV color conversion.

Here is how MUPP converts gamma corrected RGB or BGR to CIE LUV using the CIE XYZ D65 white point with a Y luminance of 1.0. The computed values of the L component are in the range [0..100], U component in the range [-134..220], and V component in the range [-140..122]. The code uses cbrtf() the 32 bit floating point cube root math function.

// use CIE D65 chromaticity coordinates #define nCIE_XYZ_D65_xn 0.312713F #define nCIE_XYZ_D65_yn 0.329016F #define nn_DIVISOR (-2.0F * nCIE_XYZ_D65_xn + 12.0F * nCIE_XYZ_D65_yn

  • 3.0F) #define nun (4.0F * nCIE_XYZ_D65_xn / nn_DIVISOR) #define nvn (9.0F * nCIE_XYZ_D65_yn / nn_DIVISOR)

// First convert to XYZ MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nX = 0.412453F * nNormalizedR + 0.35758F * nNormalizedG + 0.180423F

  • nNormalizedB; MUpp32f nY = 0.212671F * nNormalizedR + 0.71516F * nNormalizedG + 0.072169F * nNormalizedB; MUpp32f nZ = 0.019334F * nNormalizedR
  • 0.119193F * nNormalizedG + 0.950227F * nNormalizedB; // Now calculate LUV from the XYZ value MUpp32f nTemp = nX + 15.0F * nY + 3.0F * nZ; MUpp32f nu = 4.0F * nX / nTemp; MUpp32f nv = 9.0F * nY / nTemp; MUpp32f nL = 116.0F * cbrtf(nY) - 16.0F; if (nL < 0.0F) nL = 0.0F; if (nL > 100.0F) nL = 100.0F; nTemp = 13.0F * nL; MUpp32f nU = nTemp * (nu - nun); if (nU < -134.0F) nU = -134.0F; if (nU > 220.0F) nU = 220.0F; MUpp32f nV = nTemp * (nv - nvn); if (nV < -140.0F) nV = -140.0F; if (nV > 122.0F) nV = 122.0F; L = (MUpp8u)(nL * 255.0F * 0.01F); // / 100.0F U = (MUpp8u)((nU + 134.0F) * 255.0F * 0.0028249F); // / 354.0F V = (MUpp8u)((nV + 140.0F) * 255.0F * 0.0038168F); // / 262.0F

RGBToNV12

RGB to NV12 color conversion.

Functions

Function muppiRGBToNV12_8u_C3P2R

![][public]

MUppStatus muppiRGBToNV12_8u_C3P2R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst[2], int rDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[2]"}]} -->

  • int rDstStep

Return type: MUppStatus


RGBToRGBA

RGB to RGBA conversion.

Convert a packed 3 channel RGB image to a packed 4 channel RGBA image. The alpha channel is set with 255 for 8-bit unsigned char or 1.0 for 32-bit float32. The order of RGB keeps unchanged, simply adding an alpha channel, which means this API may be used to convert BGR to BGRA.

Functions

Function muppiRGBToRGBA_8u_C3C4R

![][public]

MUppStatus muppiRGBToRGBA_8u_C3C4R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 8-bit unsigned packed RGB to 4 channel 8-bit unsigned packed RGBA conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiRGBToRGBA_32f_C3C4R

![][public]

MUppStatus muppiRGBToRGBA_32f_C3C4R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 32-bit float packed RGB to 4 channel 32-bit float packed RGBA conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

MUppStatus image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


RGBToXYZ

RGB to XYZ color conversion.

Here is how MUPP converts gamma corrected RGB or BGR to XYZ.

MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nX = 0.412453F * nNormalizedR + 0.35758F * nNormalizedG + 0.180423F

  • nNormalizedB; if (nX > 1.0F) nX = 1.0F; MUpp32f nY = 0.212671F * nNormalizedR + 0.71516F * nNormalizedG + 0.072169F * nNormalizedB; if (nY > 1.0F) nY = 1.0F; MUpp32f nZ = 0.019334F * nNormalizedR + 0.119193F * nNormalizedG + 0.950227F * nNormalizedB; if (nZ > 1.0F) nZ = 1.0F; X = (MUpp8u)(nX * 255.0F); Y = (MUpp8u)(nY * 255.0F); Z = (MUpp8u)(nZ * 255.0F);

RGBToYCbCr

RGB to YCbCr color conversion.

Here is how MUPP converts gamma corrected RGB or BGR to YCbCr. In the YCbCr model, Y is defined to have a nominal range [16..235], while Cb and Cr are defined to have a range [16..240], with the value of 128 as corresponding to zero.

MUpp32f nY = 0.257F * R + 0.504F * G + 0.098F * B + 16.0F; MUpp32f nCb = -0.148F * R - 0.291F * G + 0.439F * B + 128.0F; MUpp32f nCr = 0.439F * R - 0.368F * G - 0.071F * B + 128.0F;

Functions

Function muppiRGBToYCbCr_8u_C3R

![][public]

MUppStatus muppiRGBToYCbCr_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


RGBToYCbCr411

RGB to YCbCr411 color conversion.


RGBToYCbCr420

RGB to YCbCr420 color conversion.

Functions

Function muppiRGBToYCbCr420_8u_C3P3R

![][public]

MUppStatus muppiRGBToYCbCr420_8u_C3P3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst[3], int rDstStep[3], MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

  • int rDstStep

Return type: MUppStatus


RGBToYCbCr422

RGB to YCbCr422 color conversion.


RGBToYCC

RGB to PhotoYCC color conversion.

This is how MUPP converts gamma corrected BGR or RGB to PhotoYCC. The computed Y, C1, C2 values are then quantized and converted to fit in the range [0..1] before expanding to 8 bits.

MUpp32f nNormalizedR = (MUpp32f)R * 0.003921569F; // / 255.0F MUpp32f nNormalizedG = (MUpp32f)G * 0.003921569F; MUpp32f nNormalizedB = (MUpp32f)B * 0.003921569F; MUpp32f nY = 0.299F * nNormalizedR + 0.587F * nNormalizedG + 0.114F * nNormalizedB; MUpp32f nC1 = nNormalizedB - nY; nC1 = 111.4F * 0.003921569F * nC1 + 156.0F * 0.003921569F; MUpp32f nC2 = nNormalizedR - nY; nC2 = 135.64F * 0.003921569F * nC2 + 137.0F * 0.003921569F; nY = 1.0F * 0.713267F * nY; // / 1.402F Y = (MUpp8u)(nY * 255.0F); C1 = (MUpp8u)(nC1 * 255.0F); C2 = (MUpp8u)(nC2 * 255.0F);


RGBToYCrCb420

RGB to YCrCb420 color conversion.


RGBToYCrCb422

RGB to YCrCb422 color conversion.


RGBToYUV

RGB to YUV color conversion.

Here is how MUPP converts gamma corrected RGB or BGR to YUV. For digital RGB values in the range [0..255], Y has the range [0..255], U varies in the range [-112..+112], and V in the range [-157..+157]. To fit in the range of [0..255], a constant value of 128 is added to computed U and V values, and V is then saturated.

// For MUpp8u data MUpp32f nY = 0.299F * R + 0.587F * G + 0.114F * B; MUpp32f nU = (0.492F * ((MUpp32f)nB - nY)) + 128.0F; MUpp32f nV = (0.877F * ((MUpp32f)nR - nY)) + 128.0F; if (nV > 255.0F) nV = 255.0F;

// For MUpp32f data(normalized to [0,1]) MUpp32f nY = 0.299F * R + 0.587F * G + 0.114F * B; MUpp32f nU = (0.492F * ((MUpp32f)nB - nY)) + 0.5F; MUpp32f nV = (0.877F * ((MUpp32f)nR - nY)) + 0.5F; if (nV > 1.0F) nV = 1.0F;

Functions

Function muppiRGBToYUV_8u_C3R

![][public]

MUppStatus muppiRGBToYUV_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiRGBToYUV_32f_C3R

![][public]

MUppStatus muppiRGBToYUV_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 32-bit float packed RGB to 3 channel 32-bit float packed YUV color conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


RGBToYUV420

RGB to YUV420 color conversion.

Functions

Function muppiRGBToYUV420_8u_P3R

![][public]

MUppStatus muppiRGBToYUV420_8u_P3R(const MUpp8u *const pSrc[3], int nSrcStep, MUpp8u *pDst[3], int rDstStep[3], MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

  • int rDstStep

Return type: MUppStatus

Function muppiRGBToYUV420_8u_C3P3R

![][public]

MUppStatus muppiRGBToYUV420_8u_C3P3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst[3], int rDstStep[3], MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc

  • int nSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

  • int rDstStep

Return type: MUppStatus


RGBToYUV422

RGB to YUV422 color conversion.

MUPP converts YUV to gamma corrected BGR the same way as in YUVToBGR.


Rotate

The set of rotate functions available in the library.

Common parameters for muppiRotate functions include:

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • oSrcSize: Size in pixels of the source image
  • oSrcROI: Region of interest in the source image.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oDstROI: Region of interest in the destination image.
  • nAngle: The angle of rotation in degrees.
  • nShiftX: Shift along horizontal axis
  • nShiftY: Shift along vertical axis
  • eInterpolation: The type of interpolation to perform resampling
  • muppStreamCtx: application_managed_stream_context.

Returns:

image_data_error_codes, roi_error_codes, Rotate Error Codes

Functions

Function muppiRotate_32f_C1R

![][public]

MUppStatus muppiRotate_32f_C1R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, double nAngle, double nShiftX, double nShiftY, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • double nAngle
  • double nShiftX
  • double nShiftY
  • int eInterpolation

Return type: MUppStatus

Function muppiRotate_32f_C3R

![][public]

MUppStatus muppiRotate_32f_C3R(const MUpp32f *pSrc, MUppiSize oSrcSize, int nSrcStep, MUppiRect oSrcROI, MUpp32f *pDst, int nDstStep, MUppiRect oDstROI, double nAngle, double nShiftX, double nShiftY, int eInterpolation)

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep
  • double nAngle
  • double nShiftX
  • double nShiftY
  • int eInterpolation

Return type: MUppStatus


Rotate Utility Functions

The set of rotate utility functions.

Functions

Function muppiGetRotateQuad

![][public]

MUppStatus muppiGetRotateQuad(MUppiRect oSrcROI, double aQuad[4][2], double nAngle, double nShiftX, double nShiftY)

Compute shape of rotated image.

Parameters:

  • oSrcROI: Region-of-interest of the source image.
  • aQuad: Array of 2D points. These points are the locations of the corners of the rotated ROI.
  • nAngle: The rotation nAngle.
  • nShiftX: Post-rotation shift in x-direction
  • nShiftY: Post-rotation shift in y-direction

Returns:

roi_error_codes.

Parameters:

  • double aQuad
  • double nAngle
  • double nShiftX
  • double nShiftY

Return type: MUppStatus

Function muppiGetRotateBound

![][public]

MUppStatus muppiGetRotateBound(MUppiRect oSrcROI, double aBound[2][2], double nAngle, double nShiftX, double nShiftY)

Compute bounding-box of rotated image. Parameters:

  • oSrcROI: Region-of-interest of the source image.
  • aBound: Two 2D points representing the bounding-box of the rotated image. All four points from muppiGetRotateQuad are contained inside the axis-aligned rectangle spanned by the the two points of this bounding box.
  • nAngle: The rotation angle.
  • nShiftX: Post-rotation shift in x-direction.
  • nShiftY: Post-rotation shift in y-direction.

Returns:

roi_error_codes.

Parameters:

  • double aBound
  • double nAngle
  • double nShiftX
  • double nShiftY

Return type: MUppStatus


10Log10

Ten times the decimal logarithm of each sample of a signal.


L1 Norm

Performs the L1 norm on the samples of a signal.


L1 Norm Diff

Performs the L1 norm on the samples of two input signals' difference.


L2 Norm

Performs the L2 norm on the samples of a signal.


L2 Norm Diff

Performs the L2 norm on the samples of two input signals' difference.


Abs

Absolute value of each sample of a signal.

Functions

Function muppsAbs_32f_Ctx

![][public]

MUppStatus muppsAbs_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal absolute value. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsAbs_32f

![][public]

MUppStatus muppsAbs_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsAbs_32f_I_Ctx

![][public]

MUppStatus muppsAbs_32f_I_Ctx(MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal absolute value. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsAbs_32f_I

![][public]

MUppStatus muppsAbs_32f_I(MUpp32f *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


Add

Sample by sample addition of two signals.


AddC

Adds a constant value to each sample of a signal.


AddProduct

Adds sample by sample product of two signals to the destination signal.

Functions

Function muppsAddProduct_32f_Ctx

![][public]

MUppStatus muppsAddProduct_32f_Ctx(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal add product of source signal times destination signal to destination signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer. pSrc2 source_signal_pointer. pDst destination_signal_pointer. product of source1 and source2 signal elements to be added to destination elements
  • nLength: length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsAddProduct_32f

![][public]

MUppStatus muppsAddProduct_32f(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsAddProduct_32fc_Ctx

![][public]

MUppStatus muppsAddProduct_32fc_Ctx(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal add product of source signal times destination signal to destination signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer.
  • pDst: destination_signal_pointer. product of source1 and source2 signal elements to be added to destination elements
  • nLength: length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsAddProduct_32fc

![][public]

MUppStatus muppsAddProduct_32fc(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus


AddProductC

Adds product of a constant and each sample of a source signal to the each sample of destination signal.


And

Sample by sample bitwise AND of samples from two signals.


AndC

Bitwise AND of a constant and each sample of a signal.


Arithmetic Operations

The set of arithmetic operations for signal processing available in the library.

Submodules


Arithmetic and Logical

Operations

Functions that provide common arithmetic and logical operations.

Submodules


AverageError

Primitives for computing the Average error between two signals. Given two signals formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with length formula {"type":"element","name":"formula","attributes":{"id":"111"},"children":[{"type":"text","text":"$N$"}]}, the average error is defined as formula {"type":"element","name":"formula","attributes":{"id":"122"},"children":[{"type":"text","text":"\\[Average Error = \\frac{1}{N}\\sum_{n=0}^{N-1}\\left|pSrc1(n) -\npSrc2(n)\\right|\\]"}]}

If the signal is in complex format, the absolute value of the complex number is used.


AverageRelativeError

Primitives for computing the AverageRelative error between two signals. Given two signals formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with length formula {"type":"element","name":"formula","attributes":{"id":"111"},"children":[{"type":"text","text":"$N$"}]}, the average relative error is defined as formula {"type":"element","name":"formula","attributes":{"id":"124"},"children":[{"type":"text","text":"\\[AverageRelativeError = \\frac{1}{N}\\sum_{n=0}^{N-1}\\frac{\\left|pSrc1(n) -\npSrc2(n)\\right|}{max(\\left|pSrc1(n)\\right|, \\left|pSrc2(n)\\right|)}\\]"}]}

If the signal is in complex format, the absolute value of the complex number is used.


Cauchy, CauchyD, and CauchyDD2

Determine Cauchy robust error function and its first and second derivatives for each sample of a signal.


Conversion Functions

Functions that provide conversion and threshold operations

Submodules


Convert

The set of conversion operations available in the library

Functions

Function muppsConvert_32f64f_Ctx

![][public]

MUppStatus muppsConvert_32f64f_Ctx(const MUpp32f *pSrc, MUpp64f *pDst, int nLength, MUppStreamContext muppStreamCtx)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsConvert_32f64f

![][public]

MUppStatus muppsConvert_32f64f(const MUpp32f *pSrc, MUpp64f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsConvert_64f32f_Ctx

![][public]

MUppStatus muppsConvert_64f32f_Ctx(const MUpp64f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

Parameters:

  • const MUpp64f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsConvert_64f32f

![][public]

MUppStatus muppsConvert_64f32f(const MUpp64f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp64f * pSrc
  • int nLength

Return type: MUppStatus


Copy

The set of copy initialization operations available in the library.

Copy

Copy methods for various type signals. Copy methods operate on signal data given as a pointer to the underlying data-type (e.g. 8-bit vectors would be passed as pointers to MUpp8u type) and length of the vectors, i.e. the number of items.

Function muppsCopy_32f_Ctx

![][public]

MUppStatus muppsCopy_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit float, vector copy method. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsCopy_32f

![][public]

MUppStatus muppsCopy_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsCopy_32fc_Ctx

![][public]

MUppStatus muppsCopy_32fc_Ctx(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex float, vector copy method. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsCopy_32fc

![][public]

MUppStatus muppsCopy_32fc(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus


Count In Range

Calculates the number of elements from specified range in the samples of a signal.


Count Zero Crossings

Calculates the number of zero crossings in a signal.


Cubrt

Cube root of each sample of a signal.


Div

Sample by sample division of the samples of two signals.

Functions

Function muppsDiv_32f_Ctx

![][public]

MUppStatus muppsDiv_32f_Ctx(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal divide signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer, signal1 divisor elements to be divided into signal2 dividend elements.
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsDiv_32f

![][public]

MUppStatus muppsDiv_32f(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsDiv_32fc_Ctx

![][public]

MUppStatus muppsDiv_32fc_Ctx(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal divide signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer, signal1 divisor elements to be divided into signal2 dividend elements.
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsDiv_32fc

![][public]

MUppStatus muppsDiv_32fc(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsDiv_32f_I_Ctx

![][public]

MUppStatus muppsDiv_32f_I_Ctx(const MUpp32f *pSrc, MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point in place signal divide signal, then clamp to saturated value. Parameters:

  • pSrc: source_signal_pointer.
  • pSrcDst: in_place_signal_pointer. signal1 divisor elements to be divided into signal2 dividend elements
  • nLength: length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsDiv_32f_I

![][public]

MUppStatus muppsDiv_32f_I(const MUpp32f *pSrc, MUpp32f *pSrcDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsDiv_32fc_I_Ctx

![][public]

MUppStatus muppsDiv_32fc_I_Ctx(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point in place signal divide signal, then clamp to saturated value. Parameters:

  • pSrc: source_signal_pointer.
  • pSrcDst: in_place_signal_pointer. signal1 divisor elements to be divided into signal2 dividend elements
  • nLength: length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsDiv_32fc_I

![][public]

MUppStatus muppsDiv_32fc_I(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus


DivC

Divides each sample of a signal by a constant.


DivCRev

Divides a constant by each sample of a signal.


Div_Round

Sample by sample division of the samples of two signals with rounding.


Dot Product

Performs the dot product operation on the samples of two input signals.


Exp

E raised to the power of each sample of a signal.

Functions

Function muppsExp_32f_Ctx

![][public]

MUppStatus muppsExp_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal exponent. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsExp_32f

![][public]

MUppStatus muppsExp_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsExp_32f_I_Ctx

![][public]

MUppStatus muppsExp_32f_I_Ctx(MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal exponent. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsExp_32f_I

![][public]

MUppStatus muppsExp_32f_I(MUpp32f *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


Filtering Functions

Functions that provide functionality of generating output signal based on the input signal like signal integral, etc.


Free

Free signal memory.


Infinity Norm

Performs the infinity norm on the samples of a signal.


Infinity Norm Diff

Performs the infinity norm on the samples of two input signals' difference.


Initialization

Functions that provide functionality of initialization signal like: set, zero or copy other signal.

Submodules


Arctan

Inverse tangent of each sample of a signal.


Ln

Natural logarithm of each sample of a signal.

Functions

Function muppsLn_32f_Ctx

![][public]

MUppStatus muppsLn_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal natural logarithm. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsLn_32f

![][public]

MUppStatus muppsLn_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsLn_32f_I_Ctx

![][public]

MUppStatus muppsLn_32f_I_Ctx(MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal natural logarithm. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsLn_32f_I

![][public]

MUppStatus muppsLn_32f_I(MUpp32f *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


Logical And Shift Operations

The set of logical and shift operations for signal processing available in the library.

Submodules


LShiftC

Left shifts the bits of each sample of a signal by a constant amount.


Malloc

Signal-allocator methods for allocating 1D arrays of data in device memory. All allocators have size parameters to specify the size of the signal (1D array) being allocated.

The allocator methods return a pointer to the newly allocated memory of appropriate type. If device-memory allocation is not possible due to resource constaints the allocators return 0 (i.e. NULL pointer).

All signal allocators allocate memory aligned such that it is beneficial to the performance of the majority of the signal-processing primitives. It is no mandatory however to use these allocators. Any valid MUSA device-memory pointers can be passed to MUPP primitives.


Maximum

Performs the maximum operation on the samples of a signal.


MaximumError

Primitives for computing the maximum error between two signals. Given two signals formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with length formula {"type":"element","name":"formula","attributes":{"id":"111"},"children":[{"type":"text","text":"$N$"}]}, the maximum error is defined as the largest absolute difference between the corresponding elements of two signals.

If the signal is in complex format, the absolute value of the complex number is used.


MaximumRelativeError

Primitives for computing the MaximumRelative error between two signals. Given two signals formula {"type":"element","name":"formula","attributes":{"id":"47"},"children":[{"type":"text","text":"$pSrc1$"}]} and formula {"type":"element","name":"formula","attributes":{"id":"48"},"children":[{"type":"text","text":"$pSrc2$"}]} both with length formula {"type":"element","name":"formula","attributes":{"id":"111"},"children":[{"type":"text","text":"$N$"}]}, the maximum relative error is defined as formula {"type":"element","name":"formula","attributes":{"id":"123"},"children":[{"type":"text","text":"\\[MaximumRelativeError = max{\\frac{\\left|pSrc1(n) -\npSrc2(n)\\right|}{max(\\left|pSrc1(n)\\right|, \\left|pSrc2(n)\\right|)}}\\]"}]}

If the signal is in complex format, the absolute value of the complex number is used.


Mean

Performs the mean operation on the samples of a signal.


Mean And Standard Deviation

Performs the mean and calculates the standard deviation for the samples of a signal.


Memory Management

Functions that provide memory management functionality like malloc and free.

Submodules


Minimum

Performs the minimum operation on the samples of a signal.


MinEvery And MaxEvery Functions

Performs the min or max operation on the samples of a signal.


Minimum Maximum

Performs the maximum and the minimum operation on the samples of a signal.


Mul

Sample by sample multiplication the samples of two signals.

Functions

Function muppsMul_32fc_Ctx

![][public]

MUppStatus muppsMul_32fc_Ctx(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal times signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer. signal2 elements to be multiplied by signal1 elements
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsMul_32fc

![][public]

MUppStatus muppsMul_32fc(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsMul_32f32fc_Ctx

![][public]

MUppStatus muppsMul_32f32fc_Ctx(const MUpp32f *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal times 32-bit complex floating point signal with complex 32-bit floating point result, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer. pSrc2 source_signal_pointer. signal2 elements to be multiplied by signal1 elements
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsMul_32f32fc

![][public]

MUppStatus muppsMul_32f32fc(const MUpp32f *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsMul_32fc_I_Ctx

![][public]

MUppStatus muppsMul_32fc_I_Ctx(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point in place signal times signal, then clamp to saturated value. Parameters:

  • pSrc: source_signal_pointer.
  • pSrcDst: in_place_signal_pointer. signal2 elements to be multiplied by signal1 elements
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsMul_32fc_I

![][public]

MUppStatus muppsMul_32fc_I(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsMul_32f32fc_I_Ctx

![][public]

MUppStatus muppsMul_32f32fc_I_Ctx(const MUpp32f *pSrc, MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point in place signal times 32-bit floating point signal, then clamp to 32-bit complex floating point saturated value. Parameters:

  • pSrc: source_signal_pointer. pSrcDst in_place_signal_pointer. signal2 elements to be multiplied by signal1 elements
  • nLength: length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsMul_32f32fc_I

![][public]

MUppStatus muppsMul_32f32fc_I(const MUpp32f *pSrc, MUpp32fc *pSrcDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus


MulC

Multiplies each sample of a signal by a constant value.

Functions

Function muppsMulC_32fc_I_Ctx

![][public]

MUppStatus muppsMulC_32fc_I_Ctx(MUpp32fc nValue, MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point complex number (32 bit real, 32 bit imaginary) in place signal times constant. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nValue: Constant value to be multiplied by each vector element
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsMulC_32fc_I

![][public]

MUppStatus muppsMulC_32fc_I(MUpp32fc nValue, MUpp32fc *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsMulC_32fc_Ctx

![][public]

MUppStatus muppsMulC_32fc_Ctx(const MUpp32fc *pSrc, MUpp32fc nValue, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point complex number (32 bit real, 32 bit imaginary) signal times constant. Parameters:

  • pSrc: source_signal_pointer.
  • nValue: Constant value to be multiplied by each vector element
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsMulC_32fc

![][public]

MUppStatus muppsMulC_32fc(const MUpp32fc *pSrc, MUpp32fc nValue, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus


Normalize

Normalize each sample of a real or complex signal using offset and division operations.


Not

Bitwise NOT of each sample of a signal.


Or

Sample by sample bitwise OR of the samples from two signals.


OrC

Bitwise OR of a constant and each sample of a signal.


RShiftC

Right shifts the bits of each sample of a signal by a constant amount.


Set

The set of set initialization operations available in the library.


Sqrt

Square root of each sample of a signal.

Functions

Function muppsSqrt_32f_Ctx

![][public]

MUppStatus muppsSqrt_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal square root. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqrt_32f

![][public]

MUppStatus muppsSqrt_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqrt_32fc_Ctx

![][public]

MUppStatus muppsSqrt_32fc_Ctx(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal square root. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqrt_32fc

![][public]

MUppStatus muppsSqrt_32fc(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqrt_32f_I_Ctx

![][public]

MUppStatus muppsSqrt_32f_I_Ctx(MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal square root. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqrt_32f_I

![][public]

MUppStatus muppsSqrt_32f_I(MUpp32f *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqrt_32fc_I_Ctx

![][public]

MUppStatus muppsSqrt_32fc_I_Ctx(MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal square root. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqrt_32fc_I

![][public]

MUppStatus muppsSqrt_32fc_I(MUpp32fc *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


Sqr

Squares each sample of a signal.

Functions

Function muppsSqr_32f_Ctx

![][public]

MUppStatus muppsSqr_32f_Ctx(const MUpp32f *pSrc, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal squared. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqr_32f

![][public]

MUppStatus muppsSqr_32f(const MUpp32f *pSrc, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqr_32fc_Ctx

![][public]

MUppStatus muppsSqr_32fc_Ctx(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal squared. Parameters:

  • pSrc: source_signal_pointer.
  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqr_32fc

![][public]

MUppStatus muppsSqr_32fc(const MUpp32fc *pSrc, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSqr_32f_I_Ctx

![][public]

MUppStatus muppsSqr_32f_I_Ctx(MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal squared. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqr_32f_I

![][public]

MUppStatus muppsSqr_32f_I(MUpp32f *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqr_32fc_I_Ctx

![][public]

MUppStatus muppsSqr_32fc_I_Ctx(MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal squared. Parameters:

  • pSrcDst: in_place_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsSqr_32fc_I

![][public]

MUppStatus muppsSqr_32fc_I(MUpp32fc *pSrcDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


Standard Deviation

Calculates the standard deviation for the samples of a signal.


Statistical Functions

Functions that provide global signal statistics like: sum, mean, standard deviation, min, max, etc.

Submodules


Sub

Sample by sample subtraction of the samples of two signals.

Functions

Function muppsSub_32f_Ctx

![][public]

MUppStatus muppsSub_32f_Ctx(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point signal subtract signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer. signal1 elements to be subtracted from signal2 elements
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsSub_32f

![][public]

MUppStatus muppsSub_32f(const MUpp32f *pSrc1, const MUpp32f *pSrc2, MUpp32f *pDst, int nLength)

Parameters:

  • const MUpp32f * pSrc1
  • const MUpp32f * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsSub_32fc_Ctx

![][public]

MUppStatus muppsSub_32fc_Ctx(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point signal subtract signal, then clamp to saturated value. Parameters:

  • pSrc1: source_signal_pointer.
  • pSrc2: source_signal_pointer. signal1 elements to be subtracted from signal2 elements
  • pDst: destination_signal_pointer. nLength length_specification. muppStreamCtx application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsSub_32fc

![][public]

MUppStatus muppsSub_32fc(const MUpp32fc *pSrc1, const MUpp32fc *pSrc2, MUpp32fc *pDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc1
  • const MUpp32fc * pSrc2
  • int nLength

Return type: MUppStatus

Function muppsSub_32f_I_Ctx

![][public]

MUppStatus muppsSub_32f_I_Ctx(const MUpp32f *pSrc, MUpp32f *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit floating point in place signal subtract signal, then clamp to saturated value. Parameters:

  • pSrc: source_signal_pointer.
  • pSrcDst: in_place_signal_pointer. signal1 elements to be subtracted from signal2 elements
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSub_32f_I

![][public]

MUppStatus muppsSub_32f_I(const MUpp32f *pSrc, MUpp32f *pSrcDst, int nLength)

Parameters:

  • const MUpp32f * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSub_32fc_I_Ctx

![][public]

MUppStatus muppsSub_32fc_I_Ctx(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit complex floating point in place signal subtract signal, then clamp to saturated value. Parameters:

  • pSrc: source_signal_pointer.
  • pSrcDst: in_place_signal_pointer. signal1 elements to be subtracted from signal2 elements
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus

Function muppsSub_32fc_I

![][public]

MUppStatus muppsSub_32fc_I(const MUpp32fc *pSrc, MUpp32fc *pSrcDst, int nLength)

Parameters:

  • const MUpp32fc * pSrc
  • int nLength

Return type: MUppStatus


SubC

Subtracts a constant from each sample of a signal.


SubCRev

Subtracts each sample of a signal from a constant.


Sum

signal_min_every_or_max_every

Performs the sum operation on the samples of a signal.


SumLn

Sums up the natural logarithm of each sample of a signal.


Threshold

The set of threshold operations available in the library.


Xor

Sample by sample bitwise XOR of the samples from two signals.


XorC

Bitwise XOR of a constant and each sample of a signal.


Zero

The set of zero initialization operations available in the library.

Zero

Set signals to zero.

Function muppsZero_32fc_Ctx

![][public]

MUppStatus muppsZero_32fc_Ctx(MUpp32fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

32-bit float complex, vector zero method. Parameters:

  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsZero_32fc

![][public]

MUppStatus muppsZero_32fc(MUpp32fc *pDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsZero_64fc_Ctx

![][public]

MUppStatus muppsZero_64fc_Ctx(MUpp64fc *pDst, int nLength, MUppStreamContext muppStreamCtx)

64-bit double complex, vector zero method. Parameters:

  • pDst: destination_signal_pointer.
  • nLength: length_specification.
  • muppStreamCtx: application_managed_stream_context.

Returns:

signal_data_error_codes, length_error_codes.

Parameters:

  • int nLength

Return type: MUppStatus

Function muppsZero_64fc

![][public]

MUppStatus muppsZero_64fc(MUpp64fc *pDst, int nLength)

Parameters:

  • int nLength

Return type: MUppStatus


SqrDistanceFull_Norm

Primitives for computing the normalized Euclidean distance between two images with full mode.


SqrDistanceSame_Norm

Primitives for computing the normalized Euclidean distance between two images with same mode.


SqrDistanceValid_Norm

Primitives for computing the normalized Euclidean distance between two images with valid mode.


MUPP Type Definitions and Constants

Definitions of types, structures, enumerations and constants available in the library.

Submodules

Enumeration types

Enumeration type MUppiInterpolationMode

![][public]

Definition: muppdefs.h (line 89)

enum MUppiInterpolationMode { MUPPI_INTER_UNDEFINED = 0, MUPPI_INTER_NN = 1, MUPPI_INTER_LINEAR = 2, MUPPI_INTER_CUBIC = 4, MUPPI_INTER_CUBIC2P_BSPLINE, MUPPI_INTER_CUBIC2P_CATMULLROM, MUPPI_INTER_CUBIC2P_B05C03, MUPPI_INTER_SUPER = 8, MUPPI_INTER_LANCZOS = 16, MUPPI_INTER_LANCZOS3_ADVANCED = 17, MUPPI_SMOOTH_EDGE = reinterpret_cast<int>(0x8000000) }

Filtering methods.

Enumerator MUPPI_INTER_UNDEFINED

Enumerator MUPPI_INTER_NN

Nearest neighbor filtering.

Enumerator MUPPI_INTER_LINEAR

Linear interpolation.

Enumerator MUPPI_INTER_CUBIC

Cubic interpolation.

Enumerator MUPPI_INTER_CUBIC2P_BSPLINE

Two-parameter cubic filter (B=1, C=0)

Enumerator MUPPI_INTER_CUBIC2P_CATMULLROM

Enumerator MUPPI_INTER_CUBIC2P_B05C03

Enumerator MUPPI_INTER_SUPER

Super sampling.

Enumerator MUPPI_INTER_LANCZOS

Lanczos filtering.

Enumerator MUPPI_INTER_LANCZOS3_ADVANCED

Smooth edge filtering.

Enumerator MUPPI_SMOOTH_EDGE

Enumeration type MUppiCopyPaddingMode

![][public]

Definition: muppdefs.h (line 108)

enum MUppiCopyPaddingMode { NONE, CONSTANT, REPLICATE, WRAP }

Padding Mode used for Crop functions.

Enumerator NONE

Enumerator CONSTANT

Enumerator REPLICATE

Enumerator WRAP

Enumeration type MUppiBayerGridPosition

![][public]

Definition: muppdefs.h (line 118)

enum MUppiBayerGridPosition { MUPPI_BAYER_BGGR = 0, MUPPI_BAYER_RGGB = 1, MUPPI_BAYER_GBRG = 2, MUPPI_BAYER_GRBG = 3 }

Bayer Grid Position Registration.

Enumerator MUPPI_BAYER_BGGR

Default registration position.

Enumerator MUPPI_BAYER_RGGB

Enumerator MUPPI_BAYER_GBRG

Enumerator MUPPI_BAYER_GRBG

Enumeration type MUppiMaskSize

![][public]

Definition: muppdefs.h (line 128)

enum MUppiMaskSize { MUPP_MASK_SIZE_1_X_3, MUPP_MASK_SIZE_1_X_5, MUPP_MASK_SIZE_3_X_1 = 100, MUPP_MASK_SIZE_5_X_1, MUPP_MASK_SIZE_3_X_3 = 200, MUPP_MASK_SIZE_5_X_5, MUPP_MASK_SIZE_7_X_7 = 400, MUPP_MASK_SIZE_9_X_9 = 500, MUPP_MASK_SIZE_11_X_11 = 600, MUPP_MASK_SIZE_13_X_13 = 700, MUPP_MASK_SIZE_15_X_15 = 800 }

Fixed filter-kernel sizes.

Enumerator MUPP_MASK_SIZE_1_X_3

Enumerator MUPP_MASK_SIZE_1_X_5

Enumerator MUPP_MASK_SIZE_3_X_1

Enumerator MUPP_MASK_SIZE_5_X_1

Enumerator MUPP_MASK_SIZE_3_X_3

Enumerator MUPP_MASK_SIZE_5_X_5

Enumerator MUPP_MASK_SIZE_7_X_7

Enumerator MUPP_MASK_SIZE_9_X_9

Enumerator MUPP_MASK_SIZE_11_X_11

Enumerator MUPP_MASK_SIZE_13_X_13

Enumerator MUPP_MASK_SIZE_15_X_15

Enumeration type MUppiDifferentialKernel

![][public]

Definition: muppdefs.h (line 146)

enum MUppiDifferentialKernel { MUPP_FILTER_SOBEL, MUPP_FILTER_SCHARR }

Differential Filter types

Enumerator MUPP_FILTER_SOBEL

Enumerator MUPP_FILTER_SCHARR

Enumeration type MUppStatus

![][public]

Definition: muppdefs.h (line 159)

enum MUppStatus { MUPP_NOT_SUPPORTED_MODE_ERROR = -9999, MUPP_INVALID_HOST_POINTER_ERROR = -1032, MUPP_INVALID_DEVICE_POINTER_ERROR = -1031, MUPP_LUT_PALETTE_BITSIZE_ERROR = -1030, MUPP_ZC_MODE_NOT_SUPPORTED_ERROR = -1028, MUPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY = -1027, MUPP_TEXTURE_BIND_ERROR = -1024, MUPP_WRONG_INTERSECTION_ROI_ERROR = -1020, MUPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR = -1006, MUPP_MEMFREE_ERROR = -1005, MUPP_MEMSET_ERROR = -1004, MUPP_MEMCPY_ERROR = -1003, MUPP_ALIGNMENT_ERROR = -1002, MUPP_MUSA_KERNEL_EXECUTION_ERROR = -1000, MUPP_ROUND_MODE_NOT_SUPPORTED_ERROR = -213, MUPP_QUALITY_INDEX_ERROR = -210, MUPP_RESIZE_NO_OPERATION_ERROR = -201, MUPP_OVERFLOW_ERROR = -109, MUPP_NOT_EVEN_STEP_ERROR = -108, MUPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR = -107, MUPP_LUT_NUMBER_OF_LEVELS_ERROR = -106, MUPP_CORRUPTED_DATA_ERROR = -61, MUPP_CHANNEL_ORDER_ERROR = -60, MUPP_ZERO_MASK_VALUE_ERROR = -59, MUPP_QUADRANGLE_ERROR = -58, MUPP_RECTANGLE_ERROR = -57, MUPP_COEFFICIENT_ERROR = -56, MUPP_NUMBER_OF_CHANNELS_ERROR = -53, MUPP_COI_ERROR = -52, MUPP_DIVISOR_ERROR = -51, MUPP_CHANNEL_ERROR = -47, MUPP_STRIDE_ERROR = -37, MUPP_ANCHOR_ERROR = -34, MUPP_MASK_SIZE_ERROR = -33, MUPP_RESIZE_FACTOR_ERROR = -23, MUPP_INTERPOLATION_ERROR = -22, MUPP_MIRROR_FLIP_ERROR = -21, MUPP_MOMENT_00_ZERO_ERROR = -20, MUPP_THRESHOLD_NEGATIVE_LEVEL_ERROR = -19, MUPP_THRESHOLD_ERROR = -18, MUPP_CONTEXT_MATCH_ERROR = -17, MUPP_FFT_FLAG_ERROR = -16, MUPP_FFT_ORDER_ERROR = -15, MUPP_STEP_ERROR = -14, MUPP_SCALE_RANGE_ERROR = -13, MUPP_DATA_TYPE_ERROR = -12, MUPP_OUT_OFF_RANGE_ERROR = -11, MUPP_DIVIDE_BY_ZERO_ERROR = -10, MUPP_MEMORY_ALLOCATION_ERR = -9, MUPP_NULL_POINTER_ERROR = -8, MUPP_RANGE_ERROR = -7, MUPP_SIZE_ERROR = -6, MUPP_BAD_ARGUMENT_ERROR = -5, MUPP_NO_MEMORY_ERROR = -4, MUPP_NOT_IMPLEMENTED_ERROR = -3, MUPP_ERROR = -2, MUPP_ERROR_RESERVED = -1, MUPP_NO_ERROR = 0, MUPP_SUCCESS = MUPP_NO_ERROR, MUPP_NO_OPERATION_WARNING = 1, MUPP_DIVIDE_BY_ZERO_WARNING = 6, MUPP_AFFINE_QUAD_INCORRECT_WARNING = 28, MUPP_WRONG_INTERSECTION_ROI_WARNING = 29, MUPP_WRONG_INTERSECTION_QUAD_WARNING = 30, MUPP_DOUBLE_SIZE_WARNING = 35, MUPP_MISALIGNED_DST_ROI_WARNING = 10000 }

Error Status Codes

Almost all MUPP function return error-status information using these return codes. Negative return codes indicate errors, positive return codes indicate warnings, a return code of 0 indicates success.

Enumerator MUPP_NOT_SUPPORTED_MODE_ERROR

Enumerator MUPP_INVALID_HOST_POINTER_ERROR

Enumerator MUPP_INVALID_DEVICE_POINTER_ERROR

Enumerator MUPP_LUT_PALETTE_BITSIZE_ERROR

Enumerator MUPP_ZC_MODE_NOT_SUPPORTED_ERROR

ZeroCrossing mode not supported <br/>

Enumerator MUPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY

Enumerator MUPP_TEXTURE_BIND_ERROR

Enumerator MUPP_WRONG_INTERSECTION_ROI_ERROR

Enumerator MUPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR

Enumerator MUPP_MEMFREE_ERROR

Enumerator MUPP_MEMSET_ERROR

Enumerator MUPP_MEMCPY_ERROR

Enumerator MUPP_ALIGNMENT_ERROR

Enumerator MUPP_MUSA_KERNEL_EXECUTION_ERROR

Enumerator MUPP_ROUND_MODE_NOT_SUPPORTED_ERROR

Unsupported round mode

Enumerator MUPP_QUALITY_INDEX_ERROR

Image pixels are constant for quality index

Enumerator MUPP_RESIZE_NO_OPERATION_ERROR

One of the output image dimensions is less than 1 pixel

Enumerator MUPP_OVERFLOW_ERROR

Number overflows the upper or lower limit of the data type

Enumerator MUPP_NOT_EVEN_STEP_ERROR

Step value is not pixel multiple

Enumerator MUPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR

Number of levels for histogram is less than 2

Enumerator MUPP_LUT_NUMBER_OF_LEVELS_ERROR

Number of levels for LUT is less than 2

Enumerator MUPP_CORRUPTED_DATA_ERROR

Processed data is corrupted

Enumerator MUPP_CHANNEL_ORDER_ERROR

Wrong order of the destination channels

Enumerator MUPP_ZERO_MASK_VALUE_ERROR

All values of the mask are zero The quadrangle is nonconvex or degenerates into triangle, line or point

Enumerator MUPP_QUADRANGLE_ERROR

Size of the rectangle region is less than or equal to 1

Enumerator MUPP_RECTANGLE_ERROR

Unallowable values of the transformation coefficients <br/>

Enumerator MUPP_COEFFICIENT_ERROR

Bad or unsupported number of channels

Enumerator MUPP_NUMBER_OF_CHANNELS_ERROR

Enumerator MUPP_COI_ERROR

Channel of interest is not 1, 2, or 3

Enumerator MUPP_DIVISOR_ERROR

Divisor is equal to zero

Enumerator MUPP_CHANNEL_ERROR

Illegal channel index

Enumerator MUPP_STRIDE_ERROR

Stride is less than the row length

Enumerator MUPP_ANCHOR_ERROR

Anchor point is outside mask

Enumerator MUPP_MASK_SIZE_ERROR

Lower bound is larger than upper bound

Enumerator MUPP_RESIZE_FACTOR_ERROR

Enumerator MUPP_INTERPOLATION_ERROR

Enumerator MUPP_MIRROR_FLIP_ERROR

Enumerator MUPP_MOMENT_00_ZERO_ERROR

Enumerator MUPP_THRESHOLD_NEGATIVE_LEVEL_ERROR

Enumerator MUPP_THRESHOLD_ERROR

Enumerator MUPP_CONTEXT_MATCH_ERROR

Enumerator MUPP_FFT_FLAG_ERROR

Enumerator MUPP_FFT_ORDER_ERROR

Enumerator MUPP_STEP_ERROR

Step is less or equal zero

Enumerator MUPP_SCALE_RANGE_ERROR

Enumerator MUPP_DATA_TYPE_ERROR

Enumerator MUPP_OUT_OFF_RANGE_ERROR

Enumerator MUPP_DIVIDE_BY_ZERO_ERROR

Enumerator MUPP_MEMORY_ALLOCATION_ERR

Enumerator MUPP_NULL_POINTER_ERROR

Enumerator MUPP_RANGE_ERROR

Enumerator MUPP_SIZE_ERROR

Enumerator MUPP_BAD_ARGUMENT_ERROR

Enumerator MUPP_NO_MEMORY_ERROR

Enumerator MUPP_NOT_IMPLEMENTED_ERROR

Enumerator MUPP_ERROR

Enumerator MUPP_ERROR_RESERVED

Enumerator MUPP_NO_ERROR

Error free operation Successful operation (same as MUPP_NO_ERROR)

Enumerator MUPP_SUCCESS

Enumerator MUPP_NO_OPERATION_WARNING

Indicates that no operation was performed Divisor is zero however does not terminate the execution

Enumerator MUPP_DIVIDE_BY_ZERO_WARNING

Indicates that the quadrangle passed to one of affine warping functions doesn't have necessary properties. First 3 vertices are used, the fourth vertex discarded.

Enumerator MUPP_AFFINE_QUAD_INCORRECT_WARNING

The given ROI has no interestion with either the source or destination ROI. Thus no operation was performed.

Enumerator MUPP_WRONG_INTERSECTION_ROI_WARNING

The given quadrangle has no intersection with either the source or destination ROI. Thus no operation was performed.

Enumerator MUPP_WRONG_INTERSECTION_QUAD_WARNING

Image size isn't multiple of two. Indicates that in case of 422/411/420 sampling the ROI width/height was modified for proper processing.

Enumerator MUPP_DOUBLE_SIZE_WARNING

Speed reduction due to uncoalesced memory accesses warning.

Enumerator MUPP_MISALIGNED_DST_ROI_WARNING


XYZToRGB

XYZ to RGB color conversion.

Here is how MUPP converts XYZ to gamma corrected RGB or BGR. The code assumes that X,Y, and Z values are in the range [0..1].

MUpp32f nNormalizedX = (MUpp32f)X * 0.003921569F; // / 255.0F MUpp32f nNormalizedY = (MUpp32f)Y * 0.003921569F; MUpp32f nNormalizedZ = (MUpp32f)Z * 0.003921569F; MUpp32f nR = 3.240479F * nNormalizedX - 1.53715F * nNormalizedY - 0.498535F

  • nNormalizedZ; if (nR > 1.0F) nR = 1.0F; MUpp32f nG = -0.969256F * nNormalizedX + 1.875991F * nNormalizedY + 0.041556F * nNormalizedZ; if (nG > 1.0F) nG = 1.0F; MUpp32f nB = 0.055648F * nNormalizedX - 0.204043F * nNormalizedY + 1.057311F * nNormalizedZ; if (nB > 1.0F) nB = 1.0F; R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG * 255.0F); B = (MUpp8u)(nB * 255.0F);

YCbCr411ToBGR

YCbCr411 to BGR color conversion.


YCbCr411ToRGB

YCbCr411 to RGB color conversion.


YCbCr420ToBGR

YCbCr420 to BGR color conversion.

Functions

Function muppiYCbCr420ToBGR_8u_P3C3R

![][public]

MUppStatus muppiYCbCr420ToBGR_8u_P3C3R(const MUpp8u *const pSrc[3], int rSrcStep[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


YCbCr420ToBGR_709CSC

YCbCr420_709CSC to BGR color conversion.


YCbCr420ToBGR_709HDTV

YCbCr420_709HDTV to BGR color conversion.


YCbCr420ToBGRBatch

Planar YCbCr420 to packed BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YCbCr420ToBGRBatchAdvanced

Planar YCbCr420 to packed BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YCbCr420ToRGB

YCbCr420 to RGB color conversion.

Functions

Function muppiYCbCr420ToRGB_8u_P3C3R

![][public]

MUppStatus muppiYCbCr420ToRGB_8u_P3C3R(const MUpp8u *const pSrc[3], int rSrcStep[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


YCbCr420ToRGBBatch

Planar YCbCr420 to packed RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YCbCr420ToRGBBatchAdvanced

Planar YCbCr420 to packed RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YCbCr422ToBGR

YCbCr422 to BGR color conversion.


YCbCr422ToBGRBatch

Planar YCbCr422 to packed BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YCbCr422ToBGRBatchAdvanced

Planar YCbCr422 to packed BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YCbCr422ToRGB

YCbCr422 to RGB color conversion.


YCbCr422ToRGBBatch

Planar YCbCr422 to packed RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YCbCr422ToRGBBatchAdvanced

Planar YCbCr422 to packed RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YCbCrToBGR

YCbCr to BGR color conversion.


YCbCrToBGR_709CSC

YCbCr to BGR_709CSC color conversion.


YCbCrToBGRBatch

YCbCr to BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.

MUPP converts YCbCr to gamma corrected BGR the same way as in YCbCrToBGR.


YCbCrToBGRBatchAdvanced

YCbCr to BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.

MUPP converts YCbCr to gamma corrected BGR the same way as in YCbCrToBGR.


YCbCrToRGB

YCbCr to RGB color conversion.

Here is how MUPP converts YCbCr to gamma corrected RGB or BGR. The output RGB values are saturated to the range [0..255].

MUpp32f nY = 1.164F * ((MUpp32f)Y - 16.0F); MUpp32f nR = ((MUpp32f)Cr - 128.0F); MUpp32f nB = ((MUpp32f)Cb

  • 128.0F); MUpp32f nG = nY - 0.813F * nR - 0.392F * nB; if (nG > 255.0F) nG = 255.0F; nR = nY + 1.596F * nR; if (nR > 255.0F) nR = 255.0F; nB = nY + 2.017F * nB; if (nB > 255.0F) nB = 255.0F;

Functions

Function muppiYCbCrToRGB_8u_C3R

![][public]

MUppStatus muppiYCbCrToRGB_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


YCbCrToRGBBatch

YCbCr to RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.

MUPP converts YCbCr to gamma corrected RGB the same way as in YCbCrToRGB.


YCbCrToRGBBatchAdvanced

YCbCr to RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.

MUPP converts YCbCr to gamma corrected RGB the same way as in YCbCrToRGB.


CMYK_OR_YCCK_JPEG_TO_BGR

These functions convert JPEG CMYK or YCCK color format images to either planar or packed BGR images for images which need no color profile conversion.


CMYK_OR_YCCK_JPEG_TO_RGB

These functions convert JPEG CMYK or YCCK color format images to either planar or packed RGB images for images which need no color profile conversion.


YCCKToCMYK_JPEG

This function partially converts JPEG YCCK to CMYK.

This is how MUPP converts JPEG YCCK to CMYK. MUPP only performs and initial YCC to RGB conversion using the 601 conversion coefficients and the RGB to CMY inversion leaving K unmodified. To complete this conversion to useful RGB values an additional RGB conversion needs to follow this function using the color profile contained in the YCCK JPEG file metadata section. MUPP does not directly support this conversion but potentially muppiColorTwist can be used to perform it once the conversion coefficients are known.

MUpp32f nY = static_cast<MUpp32f>(Y); MUpp32f nC1 = static_cast<MUpp32f>(Cb); MUpp32f nC2 = static_cast<MUpp32f>(Cr); MUpp32f nR = nY + 1.402F * nC2 - 179.456F; MUpp32f nG = nY - 0.34414F * nC1 - 0.71414F * nC2 + 135.45984F; MUpp32f nB = nY + 1.772F * nC1 - 226.816F;

MUpp8u nC = static_cast<MUpp8u>(255.0F - nR); MUpp8u nM = static_cast<MUpp8u>(255.0F - nG); MUpp8u nM = static_cast<MUpp8u>(255.0F - nB); MUpp8u nK = K;


YCCToRGB

PhotoYCC to RGB color conversion.

This is how MUPP converts PhotoYCC to gamma corrected RGB or BGR.

MUpp32f nNormalizedY = ((MUpp32f)Y * 0.003921569F) * 1.3584F; // / 255.0F MUpp32f nNormalizedC1 = (((MUpp32f)C1 * 0.003921569F) - 156.0F * 0.003921569F)

  • 2.2179F; MUpp32f nNormalizedC2 = (((MUpp32f)C2 * 0.003921569F) - 137.0F * 0.003921569F) * 1.8215F; MUpp32f nR = nNormalizedY + nNormalizedC2; if (nR > 1.0F) nR = 1.0F; MUpp32f nG = nNormalizedY - 0.194F * nNormalizedC1 - 0.509F * nNormalizedC2; if (nG > 1.0F) nG = 1.0F; MUpp32f nB = nNormalizedY + nNormalizedC1; if (nB > 1.0F) nB = 1.0F; R = (MUpp8u)(nR * 255.0F); G = (MUpp8u)(nG * 255.0F); B = (MUpp8u)(nB * 255.0F);

YCrCb420ToRGB

YCrCb420 to RGB color conversion.


YCrCb422ToRGB

YCrCb422 to RGB color conversion.


YUV420ToBGR

YUV420 to BGR color conversion.

Functions

Function muppiYUV420ToBGR_8u_P3C3R

![][public]

MUppStatus muppiYUV420ToBGR_8u_P3C3R(const MUpp8u *const pSrc[3], int rSrcStep[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


YUV420ToBGRBatch

Planar YUV420 to packed BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YUV420ToBGRBatchAdvanced

Planar YUV420 to packed BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YUV420ToRGB

YUV420 to RGB color conversion.

Functions

Function muppiYUV420ToRGB_8u_P3R

![][public]

MUppStatus muppiYUV420ToRGB_8u_P3R(const MUpp8u *const pSrc[3], int rSrcStep[3], MUpp8u *pDst[3], int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc

  • int rSrcStep TODO:

  • array {"type":"element","name":"array","attributes":{},"children":[{"type":"text","text":"[3]"}]} -->

  • int nDstStep

Return type: MUppStatus

Function muppiYUV420ToRGB_8u_P3C3R

![][public]

MUppStatus muppiYUV420ToRGB_8u_P3C3R(const MUpp8u *const pSrc[3], int rSrcStep[3], MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u *const pSrc
  • int rSrcStep
  • int nDstStep

Return type: MUppStatus


YUV420ToRGBBatch

Planar YUV420 to packed RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YUV420ToRGBBatchAdvanced

Planar YUV420 to packed RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YUV422ToBGRBatch

Planar YUV422 to packed BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YUV422ToBGRBatchAdvanced

Planar YUV422 to packed BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YUV422ToRGB

YUV422 to RGB color conversion.


YUV422ToRGBBatch

Planar YUV422 to packed RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.


YUV422ToRGBBatchAdvanced

Planar YUV422 to packed RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.


YUVToBGR

YUV to BGR color conversion.

Here is how MUPP converts YUV to gamma corrected RGB or BGR.

// For MUpp8u data MUpp32f nY = (MUpp32f)Y; MUpp32f nU = (MUpp32f)U - 128.0F; MUpp32f nV = (MUpp32f)V - 128.0F; MUpp32f nR = nY + 1.140F * nV; if (nR < 0.0F) nR = 0.0F; if (nR > 255.0F) nR = 255.0F; MUpp32f nG = nY - 0.394F * nU - 0.581F * nV; if (nG < 0.0F) nG = 0.0F; if (nG > 255.0F) nG = 255.0F; MUpp32f nB = nY + 2.032F * nU; if (nB < 0.0F) nB = 0.0F; if (nB > 255.0F) nB = 255.0F;

// For MUpp32f data(normalized to [0,1]) MUpp32f nY = (MUpp32f)Y; MUpp32f nU = (MUpp32f)U - 0.5F; MUpp32f nV = (MUpp32f)V - 0.5F; MUpp32f nR = nY + 1.140F * nV; if (nR < 0.0F) nR = 0.0F; if (nR > 1.0F) nR = 1.0F; MUpp32f nG = nY - 0.394F * nU - 0.581F * nV; if (nG < 0.0F) nG = 0.0F; if (nG > 1.0F) nG = 1.0F; MUpp32f nB = nY + 2.032F * nU; if (nB < 0.0F) nB = 0.0F; if (nB > 1.0F) nB = 1.0F;

Functions

Function muppiYUVToBGR_8u_C3R

![][public]

MUppStatus muppiYUVToBGR_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiYUVToBGR_32f_C3R

![][public]

MUppStatus muppiYUVToBGR_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 32-bit float packed YUV to 3 channel 32-bit float packed BGR color conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


YUVToBGRBatch

YUV to BGR batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.

MUPP converts YUV to gamma corrected BGR the same way as in YUVToBGR.


YUVToBGRBatchAdvanced

YUV to BGR batch color conversion where each pair of input/output images from provided batches has own roi_specification.

MUPP converts YUV to gamma corrected BGR the same way as in YUVToBGR.


YUVToRGB

YUV to RGB color conversion.

Here is how MUPP converts YUV to gamma corrected RGB or BGR.

// For MUpp8u data MUpp32f nY = (MUpp32f)Y; MUpp32f nU = (MUpp32f)U - 128.0F; MUpp32f nV = (MUpp32f)V - 128.0F; MUpp32f nR = nY + 1.140F * nV; if (nR < 0.0F) nR = 0.0F; if (nR > 255.0F) nR = 255.0F; MUpp32f nG = nY - 0.394F * nU - 0.581F * nV; if (nG < 0.0F) nG = 0.0F; if (nG > 255.0F) nG = 255.0F; MUpp32f nB = nY + 2.032F * nU; if (nB < 0.0F) nB = 0.0F; if (nB > 255.0F) nB = 255.0F;

// For MUpp32f data(normalized to [0,1]) MUpp32f nY = (MUpp32f)Y; MUpp32f nU = (MUpp32f)U - 0.5F; MUpp32f nV = (MUpp32f)V - 0.5F; MUpp32f nR = nY + 1.140F * nV; if (nR < 0.0F) nR = 0.0F; if (nR > 1.0F) nR = 1.0F; MUpp32f nG = nY - 0.394F * nU - 0.581F * nV; if (nG < 0.0F) nG = 0.0F; if (nG > 1.0F) nG = 1.0F; MUpp32f nB = nY + 2.032F * nU; if (nB < 0.0F) nB = 0.0F; if (nB > 1.0F) nB = 1.0F;

Functions

Function muppiYUVToRGB_8u_C3R

![][public]

MUppStatus muppiYUVToRGB_8u_C3R(const MUpp8u *pSrc, int nSrcStep, MUpp8u *pDst, int nDstStep, MUppiSize oSizeROI)

Parameters:

  • const MUpp8u * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus

Function muppiYUVToRGB_32f_C3R

![][public]

MUppStatus muppiYUVToRGB_32f_C3R(const MUpp32f *pSrc, int nSrcStep, MUpp32f *pDst, int nDstStep, MUppiSize oSizeROI)

3 channel 32-bit float packed YUV to 3 channel 32-bit float packed RGB color conversion.

Parameters:

  • pSrc: source_image_pointer.
  • nSrcStep: source_image_line_step.
  • pDst: destination_image_pointer.
  • nDstStep: destination_image_line_step.
  • oSizeROI: roi_specification.

Returns:

image_data_error_codes, roi_error_codes

Parameters:

  • const MUpp32f * pSrc
  • int nSrcStep
  • int nDstStep

Return type: MUppStatus


YUVToRGBBatch

YUV to RGB batch color conversion with a single roi_specification for all pairs of input/output images provided in batches.

MUPP converts YUV to gamma corrected RGB the same way as in YUVToRGB.


YUVToRGBBatchAdvanced

YUV to RGB batch color conversion where each pair of input/output images from provided batches has own roi_specification.

MUPP converts YUV to gamma corrected RGB the same way as in YUVToRGB.