BORDER_WRAP not available in FilterEngine (Feature #3168)

Added by Tama McGlinn about 4 years ago. Updated almost 2 years ago.

Status:Open Start date:2013-07-21
Priority:Low Due date:
Assignee:- % Done:


Category:imgproc, video
Target version:Next Hackathon Estimated time:2.00 hours
Difficulty:Easy Pull request:


modules/imgproc/src/filter.cpp:160 - CV_Assert( columnBorderType != BORDER_WRAP );

This line prevents me from making a linear filter with BORDER_WRAP type. I have no idea why this is, nor how to fix it.


Updated by Steven Puttemans almost 5 years ago

This is due to no code in the filter algorithm being provided for solving problems with the cv_borderwrap type of borderstyle. To fix it what you can do is create a pull request with the assert gone, then see how it influences the problem and where it goes wrong. But I am guessing some algorithms beneath it will generate errors which need to be fixed then.

Updated by Ivan Korolev almost 4 years ago

Hello Tama McGlinn,
Thank you for submitting this ticket. Unfortunately, FilterEngine doesn't support BORDER_WRAP type of border. If you could add this feature on your side, a pull request in our GitHub repo ( for more details) would be highly appreciated! If you decide to continue with introducing this feature then please explain what is purpose of this feature?

  • Tracker changed from Bug to Feature
  • Status changed from New to Open
  • Priority changed from Normal to Low

Updated by Alexander Smorkalov over 3 years ago

  • Assignee deleted (Vadim Pisarevsky)
  • Target version changed from 2.4.7 to Next Hackathon

Updated by isscandar isscandar almost 3 years ago

Ivan Korolev wrote:

If you decide to continue with introducing this feature then please explain what is purpose of this feature?

Hello Ivan,
in my applications I often work with a region of interest with the shape of an annulus, for some particular tasks I rectify the annulus transforming it in a rectangular stripe; a circular path (ideally one-pixel wide) inside the annulus is so transformed into a row in the rectangular stripe, for these rows I think that the BORDER_WRAP interpolation would be the best interpolation scheme. I faced the same need of Tama McGlinn when I tried to do cv::cornerHarris with borderType equal to cv::BORDER_WRAP (OpenCV 2.4.4).

Thank you.

Updated by Maksim Shabunin almost 2 years ago

Issue has been transferred to GitHub:

Also available in: Atom PDF