Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

BlockMinMax

Finds minimum and maximum values for blocks of an image.

Syntax

IppStatus ippiBlockMinMax_<dataType>_C1R(const Ipp<dataType>* pSrc, int srcStep, IppiSize srcSize, Ipp<dataType>* pDstMin, int dstMinStep, Ipp<dataType>* pDstMax, int dstMaxStep, IppiSize blockSize, Ipp<dataType>* pGlobalMin, Ipp<dataType>* pGlobalMax);

Supported values for dataType:

8u 16u 16s 32f

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines in the source image.

srcSize

Size, in pixels, of the source image.

pDstMin

Pointer to the destination image to store minimum values per block.

dstMinStep

Distance, in bytes, between the starting points of consecutive lines in the pDstMin image.

pDstMax

Pointer to the destination image to store maximum values per block.

dstMaxStep

Distance, in bytes, between the starting points of consecutive lines in the pDstMax image.

blockSize

Size, in pixels, of the image block.

pGlobalMin

Destination pointer to the minimum value for the entire source image.

pGlobalMax

Destination pointer to the maximum value for the entire source image.

Description

This function operates with ROI.

This function finds minimum and maximum values for blocks of the source image, which are defined by the blockSize parameter. Minimum and maximum values for blocks are stored in the pDstMin and pDstMax images, respectively. Minimum and maximum values for the entire image are stored in the pGlobalMin and pGlobalMax pointers, respectively.

If pDstMin or pDstMax pointer is NULL, the corresponding component (minimum or maximum value) is not calculated.

The size of the pDstMin and pDstMax images is calculated by the following formulae:

  • if srcWidth is divisible by blockWidth, the destination width is equal to:

    dstWidth=srcWidth/blockWidth

    otherwise:

    dstWidth=srcWidth/blockWidth+1

  • if srcHeight is divisible by blockHeight, the destination height is equal to:

    dstHeight=srcHeight/blockHeight

    otherwise:

    dstHeight=srcHeight/blockHeight+1

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDstMin, and pDstMax pointers are NULL.

ippStsStepErr

Indicates an error when:

  • srcStep is less than srcSize.width*<pixelSize>

  • dstMinStep or dstMaxStep is less than dstSize.width*<pixelSize>

ippStsSizeErr

Indicates an error when srcSize or blockSize has a zero or negative value.