Bilateral Blur by Pixel Bender
April 14th, 2009 | Published in Uncategorized
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.
Hope I can further optimize it later. (or better Adobe gives us GPU mode
)
UPDATED: See this blog post

