Commit be29d628 authored by vbystricky's avatar vbystricky

Check 8.1 ipp version for morphology functions, which not exists in versions before this.

parent 4512d064
...@@ -1136,7 +1136,7 @@ private: ...@@ -1136,7 +1136,7 @@ private:
Scalar borderValue; Scalar borderValue;
}; };
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 8) && (IPP_VERSION_MINOR >= 1)
static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kernel, static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kernel,
const Size& ksize, const Point &anchor, bool rectKernel) const Size& ksize, const Point &anchor, bool rectKernel)
{ {
...@@ -1186,16 +1186,16 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne ...@@ -1186,16 +1186,16 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
#else #else
IppiPoint point = {anchor.x, anchor.y}; IppiPoint point = {anchor.x, anchor.y};
// this is case, which can be used with the anchor not in center of the kernel, but // this is case, which can be used with the anchor not in center of the kernel, but
// ippiMorphologyBorderGetSize_, ippiErodeBorderReplicate_ and ippiDilateBorderReplicate_ are deprecate. // ippiMorphologyBorderGetSize_, ippiErodeBorderReplicate_ and ippiDilateBorderReplicate_ are deprecated.
#define IPP_MORPH_CASE(cvtype, flavor, data_type) \ #define IPP_MORPH_CASE(cvtype, flavor, data_type) \
case cvtype: \ case cvtype: \
{\ {\
int specSize = 0;\ int specSize = 0;\
int bufferSize = 0;\ int bufferSize = 0;\
if (ippStsNoErr != ippiMorphologyBorderGetSize_##flavor( roiSize.width, kernelSize, &specSize, &bufferSize))\ if (ippStsNoErr != ippiMorphologyGetSize_##flavor( roiSize.width, kernel.data kernelSize, &specSize))\
return false;\ return false;\
bool ok = false;\ bool ok = false;\
IppiMorphState* pState = (IppiMorphState*)ippMalloc(specSize);;\ IppiMorphState* pState = (IppiMorphState*)ippMalloc(specSize);\
if (ippiMorphologyInit_##flavor(roiSize.width, kernel.data, kernelSize, point, pState) >= 0)\ if (ippiMorphologyInit_##flavor(roiSize.width, kernel.data, kernelSize, point, pState) >= 0)\
{\ {\
if (op == MORPH_ERODE)\ if (op == MORPH_ERODE)\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment