Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

UpdateMotionHistory

Updates motion history image using motion silhouette at given timestamp.

Syntax

IppStatus ippiUpdateMotionHistory_<mod>(const Ipp<srcDatatype>* pSilhouette, int silhStep, Ipp32f* pMhi, int mhiStep, IppiSize roiSize, Ipp32f timeStamp, Ipp32f mhiDuration);

Supported values for mod:

8u32f_C1IR

16u32f_C1IR

32f_C1IR

Include Files

ippcv.h

Domain Dependencies

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

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

Parameters

pSilhouette
Pointer to the silhouette image ROI that has non-zero values for those pixels where the motion occurs.
roiSize
Size of the image ROI in pixels.
silhStep
Distance in bytes between starts of consecutive lines in the silhouette image.
pMhi
Pointer to the motion history image which is both an input and output parameter.
mhiStep
Distance in bytes between starts of consecutive lines in the motion history image.
timeStamp
Timestamp in milliseconds.
mhiDuration
Threshold for MHI pixels. MHI motions older than this threshold are deleted.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function updates the motion history image. It sets MHI pixels to the current timestamp value, if their values are non-zero.

The function deletes MHI pixels, if their values are less than the mhiDuration timestamp, that is, the pixels are “old.”

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if mhiStep or silhStep is less than roiSize.width * <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if the step value is not divisible by 2 for 16u images, and by 4 for 32f images.

ippStsOutOfRangeErr

Indicates an error when mhiDuration is negative.