Skip to content

createGaussianFilter and createSeparableLinearFilter do not support ksize > 32 #3997

@levicki

Description

@levicki

Describe the feature and motivation

I need a GaussianBlur filter with sigma 250.

Correct me if I am wrong but OpenCV doesn't seem to support such large sigmas at all.

I don't understand why there's such an arbitrary limitation in the filtering API, and I would like to see that changed, at least for CUDA if not for CPU path.

My rationale is that when you have to start edge-casing around stuff like this and writing custom filtering pipeline using CUDA directly with CUDA kernels or to resort to other libraries such as IPP, then you start asking yourself whether using OpenCV in your project was worth the hassle of building a version with contrib modules at all.

If Intel Performance Primitives can do 250 sigma, why not OpenCV? I understand that there might be optimized code for small sizes and I am not asking optimized code for all sizes because that would be unreasonable and impossible. What I am asking is that for sizes > 32 OpenCV doesn't throw an exception, but instead perform the operation with generic code which works for all sizes > 32 even if performance is less than optimal — it will certainly be much faster than rolling my own.

Please advise.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions