Ask Your Question

Possible bug in distanceTransform if you use CV_DIST_MASK_PRECISE

asked 2014-06-13 07:11:59 -0500

kschlesselmann gravatar image

updated 2014-06-13 07:12:36 -0500


currently I'm wirting on my OpenCV code here and I noticed some weird behaviour in my data processing. I looked into it and it seems that if you use

cv::distanceTransform(copy, copy, CV_DIST_L2, CV_DIST_MASK_PRECISE);

which results in [Felzenszwalb04] instead of [Borgefors86] there are wrong values introduced in the Mat after a given size (it starts at 4098 I think). The pattern looks quite regular so it's likely some memory access problem.

I provide some sample code at demonstrating the issue.

edit retag flag offensive close merge delete



1 answer

Sort by ยป oldest newest most voted

answered 2014-06-13 07:29:42 -0500

nyloc gravatar image

Just checked the example code and I have the same bug here. My setup is:
Arch Linux x86_64
OpenCV 2.4.8
gcc 4.9.0

edit flag offensive delete link more

Question Tools


Asked: 2014-06-13 07:11:59 -0500

Seen: 305 times

Last updated: Jun 13 '14