FilterDenoiseAdaptive

Performs spatio-temporal adaptive noise reduction filtering.

Syntax

IppStatus ippiFilterDenoiseAdaptive_8u_C1R(const Ipp8u* pSrcPlane[3], int srcStep, Ipp8u* pDst, int dstStep, IppiSize size, IppiRect roi, IppiSize maskSize, Ipp8u threshold, IppvcNoiseBlurFlag blurType, IppiDenoiseAdaptiveState_8u_C1* pState);

Parameters

pSrcPlane

Array of pointers to frames that incorporates three source plane pointers: pSrcPlane[0] points to the previous source image origin, pSrcPlane[1] points to the current source image origin, pSrcPlane[2] points to the next source image origin.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

pDst

Pointer to the destination image origin.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

size

Size of the source image. The destination image is of the same size.

roi

Region of interest in the source image (of the IppiRect type). The destination image has the same ROI. Size of ROI must be the same as roiSize in ippFilterDenoiseAdaptiveInitAlloc_8u_C1R.

maskSize

Parameter that defines the region used in current pixel transformation; must be the same as maskSize in ippFilterDenoiseAdaptiveInitAlloc_8u_C1R.

threshold

Parameter of the denoise algorithm for pixel comparison. If difference between the compared pixels is below the threshold value, the pixels are considered to be noised.

blurType

Type of blurring of the noised pixel. Possible modes are as follows: IPPVC_NOISE_BLUR0, IPPVC_NOISE_BLUR1, IPPVC_NOISE_BLUR2, IPPVC_NOISE_BLUR3. See Description for details.

pState

Pointer to the IppiDenoiseAdaptiveState specification structure.

Description

The function ippiFilterDenoiseAdaptive_8u_C1R is declared in the ippvc.h file. The function performs spatio-temporal adaptive noise reduction filtering. It requires information about previous, current and next source planes. The algorithm compares differences between the pixel of interest of the current frame and neighbors of the pixel of interest of the previous frame with the threshold value as well as the same differences between the pixel of interest of the current frame and the neighbors of the pixel of interest of the next frame. The neighbors of the pixel of interest are described by maskSize. The pixel is detected as noised if one of the differences is smaller than threshold. In that case, the noised pixel will be blurred by using information about the neighbors. There are four methods of blurring depending on blurType:

case IPPVC_NOISE_BLUR0:
prev = pSrcROIPrev[posCur];
next = pSrcROINext[posCur];
break;
case IPPVC_NOISE_BLUR1:
prev = sumPrev;
next = pSrcROINext[posCur];
break;
case IPPVC_NOISE_BLUR2:
prev = pSrcROIPrev[posCur];
next = sumNext;
break;
case IPPVC_NOISE_BLUR3:
prev = sumPrev;
next = sumNext;
break;
pDstROI[posCur] = (prev + next + sumCur)* scaleFactor,

where

posCur - position of the interesting pixel

sumPrev - sum of neighbours of the interesing pixel of the previous frame

sumNext - sum of neighbours of the interesing pixel of the next frame

scaleFactor - some normalization factor excluding overflow.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an incorrect input size of the image, mask, or ROI.


Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.