4.7 Blur
procedure
(flomap-gaussian-blur fm xσ [yσ]) → flomap
fm : flomap xσ : Real yσ : Real = xσ
If perfect Gaussian blur is not important, use flomap-blur instead, which approximates Gaussian blur closely and is faster.
> (flomap->bitmap (flomap-gaussian-blur (flomap-inset fm 12) 4)) > (flomap->bitmap (flomap-gaussian-blur (flomap-inset fm 12 3) 4 1))
procedure
(flomap-gaussian-blur-x fm σ) → flomap
fm : flomap σ : Real
If perfect Gaussian blur is not important, use flomap-blur-x instead, which approximates Gaussian blur closely and is usually much faster.
> (flomap->bitmap (flomap-gaussian-blur-x (flomap-inset fm 12 0) 4))
procedure
(flomap-gaussian-blur-y fm σ) → flomap
fm : flomap σ : Real
procedure
(flomap-box-blur fm x-radius [y-radius]) → flomap
fm : flomap x-radius : Real y-radius : Real = x-radius
> (flomap->bitmap (flomap-box-blur (flomap-inset fm 4) 4)) > (flomap->bitmap (flomap-box-blur (flomap-inset fm 4 1) 4 1))
procedure
(flomap-box-blur-x fm radius) → flomap
fm : flomap radius : Real
> (flomap->bitmap (flomap-box-blur-x (flomap-inset fm 4 0) 4))
procedure
(flomap-box-blur-y fm radius) → flomap
fm : flomap radius : Real
procedure
(flomap-blur fm xσ [yσ]) → flomap
fm : flomap xσ : Real yσ : Real = xσ
> (define gauss-blur-fm (time (flomap-gaussian-blur fm 12))) cpu time: 1139 real time: 288 gc time: 0
> (define blur-fm (time (flomap-blur fm 12))) cpu time: 486 real time: 124 gc time: 25
> (flomap-extreme-values (fmsqr (fm- gauss-blur-fm blur-fm)))
0.0
0.0031721674640532663
procedure
(flomap-blur-x fm xσ) → flomap
fm : flomap xσ : Real
procedure
(flomap-blur-y fm yσ) → flomap
fm : flomap yσ : Real