vImageBoxConvolve: errors when kernel size > 255

北城余情 提交于 2020-02-05 03:53:36

问题


Is anyone else having any problems when the kernel size > 255?

The error I'm getting looks like the color channels are overloading...but only when kernel size is > 255. The documentation says nothing about the limits of the kernel size. And vImage is not returning an error.

BTW, I'm using vImageBoxConvolve_ARGB8888. It happens on any image, and specifically in the white areas.

Here's an output:

That multicolor mess in the top left is really just a bright background.

Seems odd that with all the blurring going on these days that no one else would be getting this.

Thanks.


回答1:


Box convolve has (roughly) constant cost regardless of kernel size, so it and tent are the filters to use for large convolve. I am surprised that a 255*255 kernel is enough to overflow. We should be using a 32-bit signed accumulator here. Maybe tent might overflow at that size. I suggest filing a bug with a reproducible example.

http://bugreporter.apple.com



来源:https://stackoverflow.com/questions/20203402/vimageboxconvolve-errors-when-kernel-size-255

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!