Ask Your Question
0

OpenCV derivative kernel maximum aperture size 7 or 31

asked 2018-10-24 16:57:12 -0600

aaff119911 gravatar image

updated 2018-10-25 14:39:27 -0600

The OpenCV documentation states here that the maximum kernel size for getDerivKernels() is 7.

However, the code here states that the kernel size can be up to 31.

Why does the documentation say up to 7, when it is allowed up to 31? And why is it limited to 31?

Update: As kbarni says, the kernel is padded with zeroes, so after 7x7 the kernel basically stays the same. But why has it been limited to 31x31?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-10-25 06:00:06 -0600

kbarni gravatar image

If I understand the code correctly, the actual kernel size will be maximum 7.

But you can ask for larger kernels with size up to 31; in this case the kernel will be padded with 0.

edit flag offensive delete link more

Comments

It seems to be like you say, thanks for your reply. But why is the limit 31, and not unlimited?

aaff119911 gravatar imageaaff119911 ( 2018-10-25 14:34:52 -0600 )edit

... and why not 63?

sjhalayka gravatar imagesjhalayka ( 2018-10-25 16:31:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-24 16:55:47 -0600

Seen: 237 times

Last updated: Oct 25 '18