Bilateral Blur by Pixel Bender

April 14th, 2009  |  Published in Uncategorized  |  1 Comment

I’ve been working on implementing a bilateral blur for Flash. Currently the functionality is ok but the performance is quite poor (on my Intel MacBook, processing a 320×240 image takes ~2s). I’ve even tried to replace the Gaussian weighting functions with linear functions but it does not help a lot but leads to worse quality. The problem should be the sampling size of each pixel which I hard coded to be 9×9 square. Reducing the sampling area would help but again reducing quality.

It is frustrating that Pixel Bender in Flash do not have loops. Even accessing vector/matrix elements with variable index is not possible.

Anyway, here below is a demo.

Before applying filter.

Before applying filter.

After applying filter.

After applying filter.

Hope I can further optimize it later. (or better Adobe gives us GPU mode :lol: )

UPDATED: See this blog post

Tags: ,

Responses

  1. EXIT says:

    November 15th, 2011 at 1:05 am (#)

    Your code is wonderful!!!
    I love it. Thanks :)

Leave a Response

*