Ask Your Question
1

medianBlur KxK matrix size

asked Oct 13 '15

NicoCarosio gravatar image

Do anyone knows why medianBlur use a KxK size for the Matrix Kernel while Blur and Gaussian use a MxN matrix as Kernel? May be you @StevenPuttemans know the answer ;)

Preview: (hide)

Comments

1

Lol I tell to many people to call me by my name =/ nope sorry, I have not a clue. First guess would be implementation details, but I should have a deeper look.

StevenPuttemans gravatar imageStevenPuttemans (Oct 13 '15)edit
1

I am guessing that it depends on the nature of the filter. Look here on how OpenCV calculates it median filtering. It needs a center value, which means that you would need odd dimensions for a starter.

Why it doesn't allow for example to use a 5x3 kernel, I yet have to discover.

StevenPuttemans gravatar imageStevenPuttemans (Oct 13 '15)edit

1 answer

Sort by » oldest newest most voted
1

answered Oct 13 '15

Btw, it is possible in OpenCV to use a mask combined with bluring to achieve non-square median blurring. Take a look here: http://answers.opencv.org/question/30...

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Oct 13 '15

Seen: 380 times

Last updated: Oct 13 '15