Ask Your Question
3

Possible bug in distanceTransform if you use CV_DIST_MASK_PRECISE

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

kschlesselmann gravatar image

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

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.

edit retag flag offensive close merge delete

Comments

1

1 answer

Sort by ยป oldest newest most voted
1

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

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

Stats

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

Seen: 528 times

Last updated: Jun 13 '14