opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.31k stars 5.74k forks source link

Possible bug in text/erfilter - SIGSEGV #1316

Open Jaykob opened 7 years ago

Jaykob commented 7 years ago
Detailed description

I just updated the text module to the newest commit and received a SIGSEGV in the ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *parent, ERStat *prev ) (erfilter.cpp) function.

Browsing through the commits I found #876 which changes quite a few lines in this function and line 796 causes the error in my case:

region = region(Rect(1, 1, rect.width, rect.height));

Reverting fixed it for me:

rect.width += 2;
rect.height += 2;
region = region(rect);
System information (version)
alalek commented 7 years ago

Please add minimal reproducer for this issue.