MorphBlackhat
Performs top-hat operation on an image.
Syntax
IppStatus ippiMorphBlackhat_16u_C1R_L(const Ipp16u*
pSrc
, IppSizeL
srcStep
, Ipp16u*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp16u
borderValue[1]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_16s_C1R_L(const Ipp16s*
pSrc
, IppSizeL
srcStep
, Ipp16s*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp16s
borderValue[1]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_1u_C1R_L(const Ipp8u*
pSrc
, IppSizeL
srcStep
, int
srcBitOffset
, Ipp8u*
pDst
, IppSizeL
dstStep
, int
dstBitOffset
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp8u
borderValue[1]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_8u_C1R_L(const Ipp8u*
pSrc
, IppSizeL
srcStep
, Ipp8u*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp8u
borderValue[1]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_8u_C3R_L(const Ipp8u*
pSrc
, IppSizeL
srcStep
, Ipp8u*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp8u
borderValue[3]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_8u_C4R_L(const Ipp8u*
pSrc
, IppSizeL
srcStep
, Ipp8u*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp8u
borderValue[4]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_32f_C1R_L(const Ipp32f*
pSrc
, IppSizeL
srcStep
, Ipp32f*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp32f
borderValue[1]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_32f_C3R_L(const Ipp32f*
pSrc
, IppSizeL
srcStep
, Ipp32f*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp32f
borderValue[3]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
IppStatus ippiMorphBlackhat_32f_C4R_L(const Ipp32f*
pSrc
, IppSizeL
srcStep
, Ipp32f*
pDst
, IppSizeL
dstStep
, IppiSizeL
roiSize
, IppiBorderType
borderType
, const Ipp32f
borderValue[4]
, const IppiMorphAdvStateL*
pMorthSpec
, Ipp8u*
pBuffer
);
Include Files
ippcv_l.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
,
ippi.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
,
ippi.lib
Parameters
- pSrc
- Pointer to the source image ROI.
- srcStep
- Distance, in bytes, between the starting points of consecutive lines in the source image.
- srcBitOffset
- Offset, in bits, from the first byte of the source image row.
- pDst
- Pointer to the destination image ROI.
- dstStep
- Distance, in bytes, between the starting points of consecutive lines in the destination image.
- dstBitOffset
- Offset, in bits, from the first byte of the destination image row.
- roiSize
- Size of the source and destination image ROI.
- borderType
- Type of border. Possible values are:
- ippBorderDefault
- The border is set toippBorderConstwithborderValue=MAX_VALUE, whereMAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U
- ippBorderRepl
- Border is replicated from the edge pixels.
- ippBorderMirror
- Border pixels are mirrored from the source image boundary pixels.
- ippBorderConst
- Values of all border pixels are set to a constant.
- ippBorderFirstStageInMem
- You can use this border type together with theippBorderRepl,ippBorderMirror,ippBorderConst,ippBorderDefaulttypes using the|operation. For the first stage, border pixels are obtained from the source image pixels in memory. For the second stage, the function uses the border type specified with the|operation.
Mixed borders are also supported. They can be obtained by the bitwise operationORbetween any of theippBorderRepl,ippBorderConst,ippBorderDefault, orippBorderMirrorvalues and theippBorderInMemTop,ippBorderInMemBottom,ippBorderInMemLeft,ippBorderInMemRightmodifiers. - borderValue,borderValue[3],borderValue[4]
- Constant value to assign to pixels of the constant border. This parameter is applicable only to theippBorderConstborder type.
- pMorphSpec
- Pointer to the morphology specification structure.
- pBuffer
- Pointer to the external buffer.
Description
Before using this function, you need to initialize the morphology specification structure using the
ippiMorphInit
function.This function performs a black-hat operation on a rectangular ROI area inside a one-, three-, or four-channel 2D image using a specified in the advanced morphology state or specification structure mask and the anchor cell.
The result is equivalent to the subtraction of the initial source image from the closed source image.
The function can only process a ROI that does not exceed the maximum width and height
roiSize
specified by the initialization functions.Return Values
- ippStsNoErr
- Indicates no error.
- ippStsNullPtrErr
- Indicates an error when one of the specified pointers isNULL.
- ippStsSizeErr
- Indicates an error condition when:
- roiSizehas a field with a zero or negative value
- ROI width is more than ROI width passed to the initialization function
- ippStsStepErr
- Indicates an error condition whensrcStepordstStepis less thanroiSize.width* <pixelSize>.
- ippStsNotEvenStepErr
- Indicates an error when one of the step values is not a multiple of an element size.
- ippStsBadArgErr
- Indicates an error whenborderTypehas an illegal value.