vImageBoxConvolve: errors when kernel size > 255

2019-07-24 00:09发布

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: enter image description here

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条回答
贼婆χ
2楼-- · 2019-07-24 00:46

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

查看更多
登录 后发表回答