Ask Your Question

kschlesselmann's profile - activity

2014-06-13 10:30:28 -0600 received badge  Nice Question (source)
2014-06-13 07:29:55 -0600 received badge  Student (source)
2014-06-13 07:12:36 -0600 received badge  Editor (source)
2014-06-13 07:11:59 -0600 asked a question Possible bug in distanceTransform if you use CV_DIST_MASK_PRECISE

Hi,

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 http://pastebin.com/UNwMF8uU demonstrating the issue.