diff --git a/modules/ximgproc/src/ridgedetectionfilter.cpp b/modules/ximgproc/src/ridgedetectionfilter.cpp index dd4a383df..9ae24fd41 100644 --- a/modules/ximgproc/src/ridgedetectionfilter.cpp +++ b/modules/ximgproc/src/ridgedetectionfilter.cpp @@ -57,7 +57,7 @@ void RidgeDetectionFilterImpl::getRidgeFilteredImage(InputArray _img, OutputArra multiply(sbxx, sbyy, sbxxyy); Mat rootex; - rootex = (sb2xx + (sb2xy + sb2xy + sb2xy + sb2xy) - (sbxxyy + sbxxyy) + sb2xy ); + rootex = (sb2xx + (sb2xy + sb2xy + sb2xy + sb2xy) - (sbxxyy + sbxxyy) + sb2yy ); Mat root; sqrt(rootex, root); Mat ridgexp;