CIFilter blur issues

  • I'm doing a gaussian blur using Core Image (CIGaussianBlur).  The
    problem I'm having is the edges are not being extended during the blur
    so all four edges fade into transparency.  Is there a way to control
    how the CIGaussianBlur treats edges, such as kvImageEdgeExtend does
    for vImage convolves, or at least set the background color used for
    the blur?
  • On Dec 18, 2007, at 12:18 AM, mikevann wrote:

    > I'm doing a gaussian blur using Core Image (CIGaussianBlur).  The
    > problem I'm having is the edges are not being extended during the
    > blur so all four edges fade into transparency.  Is there a way to
    > control how the CIGaussianBlur treats edges, such as
    > kvImageEdgeExtend does for vImage convolves, or at least set the
    > background color used for the blur?

    The Core Image Filter Reference doesn't mention anything.  Can you
    just manually increase the bounds of the image before blurring?

        - Scott
  • On 18 Dec 2007, at 08:18, mikevann wrote:

    > I'm doing a gaussian blur using Core Image (CIGaussianBlur).  The
    > problem I'm having is the edges are not being extended during the
    > blur so all four edges fade into transparency.  Is there a way to
    > control how the CIGaussianBlur treats edges, such as
    > kvImageEdgeExtend does for vImage convolves, or at least set the
    > background color used for the blur?

    I don't think so, as the edge behaviour is a property of the sampler.
    The code to create the sampler is inside the CIFilter, hence it is
    only modifiable if you write a custom filter. (That doesn't stop
    Quartz Composer doing it, so there's a method somewhere, but I don't
    think it's public)

    The only solution I've come up with (in theory) is to have another
    filter add a clamped edge to the image prior to blurring.
  • Thanks a lot for the clamping tip, this seems to solve my issue.

    On Dec 18, 2007, at 1:33 AM, Paul Sargent wrote:

    > On 18 Dec 2007, at 08:18, mikevann wrote:
    >
    >> I'm doing a gaussian blur using Core Image (CIGaussianBlur).  The
    >> problem I'm having is the edges are not being extended during the
    >> blur so all four edges fade into transparency.  Is there a way to
    >> control how the CIGaussianBlur treats edges, such as
    >> kvImageEdgeExtend does for vImage convolves, or at least set the
    >> background color used for the blur?
    >
    > I don't think so, as the edge behaviour is a property of the
    > sampler. The code to create the sampler is inside the CIFilter,
    > hence it is only modifiable if you write a custom filter. (That
    > doesn't stop Quartz Composer doing it, so there's a method
    > somewhere, but I don't think it's public)
    >
    > The only solution I've come up with (in theory) is to have another
    > filter add a clamped edge to the image prior to blurring.
  • Or a clip afterwards.

    Christiaan

    On 18 Dec 2007, at 9:33 AM, Paul Sargent wrote:

    >
    > On 18 Dec 2007, at 08:18, mikevann wrote:
    >
    >> I'm doing a gaussian blur using Core Image (CIGaussianBlur).  The
    >> problem I'm having is the edges are not being extended during the
    >> blur so all four edges fade into transparency.  Is there a way to
    >> control how the CIGaussianBlur treats edges, such as
    >> kvImageEdgeExtend does for vImage convolves, or at least set the
    >> background color used for the blur?
    >
    > I don't think so, as the edge behaviour is a property of the
    > sampler. The code to create the sampler is inside the CIFilter,
    > hence it is only modifiable if you write a custom filter. (That
    > doesn't stop Quartz Composer doing it, so there's a method
    > somewhere, but I don't think it's public)
    >
    > The only solution I've come up with (in theory) is to have another
    > filter add a clamped edge to the image prior to blurring.
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today