Radius-based box blur for a rectangle or an ellipse
Brought to you by:
twm
TBitmap_BlurRect and TBitmap_BlurEllipse in src/u_dzGraphicsUtils.pas blur with repeated 3x3 steps, so a strong blur takes hundreds of passes (about 800 to make a licence plate in a 4096x2304 photo unreadable, ~2.5 s for two faces).
Proposal: new functions such as TBitmap_BoxBlurRect / TBitmap_BoxBlurEllipse(bmp, Left, Top, Right, Bottom, Radius):
A test program did this in ~100 ms for the two faces at r = 23, which matched 800 of the current passes visually. Details in [#15].
Implemented in revision #2377:
TBitmap_BoxBlurRectandTBitmap_BoxBlurEllipse(bmp, Left, Top, Right, Bottom, Radius), three passes of a separable box blur with a running sum, reading the pixels around the area. On the test photos r = 23 took about 110 ms for the two faces. The ellipse has a hard edge; the optional soft edge is not done.