First time here? Check out the FAQ!
answered 2013-01-29 11:10:42 -0600
OpenCV don't have it as a single function. But you can do it in two steps: perform dilation() / erosion(), and then perform and() / or() operation between result and the mask.