gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
Images

Several GPU functions (cf. GPU Computation functions module) refer to epilogues and prologues in both dimensions. The following image shows the 2D block notation used in our algorithms. The image shows a block and its boundary data from adjacent blocks. Note that the column-epilogue $E_{m+1,n}$ has to be extracted from the next block $B_{m+1,n}$ in column $n$ using the head operator (cf. head()) on that block.

blocks-2d.png
2D Block Notation

One of our algorithms is the overlapped summed-area table computation, dubbed as algorithm SAT (cf. algSAT()). In the following image, stage S.1 reads the input (in gray) then computes and stores incomplete prologues $P_{m,n}(\bar{Y})$ (in red) and $P^T_{m,n}(\hat{V})$ (in blue). Stage S.2 completes prologues $P_{m,n}(Y)$ and computes scalars $s\big(P_{m-1,n}(Y)\big)$ (in yellow). Stage S.3 completes prologues $P^T_{m,n}(V)$. Finally, stage S.4 reads the input and completed prologues, then computes and stores the final summed-area table.

sat-stages.png
Illustration of Algorithm SAT

For our test experiments we use the following cactus image:

cactus-512.png
Cactus Test Image

The next four images were obtained running the applications called recursive (after $ cmake'ing and $ make'ing it). The first command computes the Bicubic B-Spline interpolation of the cactus test image in the CPU using the following command:

$ ../bin/recursive -unit:cpu -filter:bspline3i ../images/cactus-512.png ../images/cactus-512-bspline-cpu.png

cactus-512-bspline-cpu.png
BSpline3i filter applied to Cactus using the CPU

And the next image using the GPU instead of the CPU:

$ ../bin/recursive -unit:gpu -filter:bspline3i ../images/cactus-512.png ../images/cactus-512-bspline-gpu.png

cactus-512-bspline-gpu.png
BSpline3i filter applied to Cactus using the GPU

The same recursive application can be used to compute the Gaussian blur of the cactus test image in the CPU using the following command:

$ ../bin/recursive -unit:cpu -filter:gaussian -sigma:4 ../images/cactus-512.png ../images/cactus-512-gauss-cpu.png

cactus-512-gauss-cpu.png
Gaussian filter applied to Cactus using the CPU

And the next image using the GPU instead of the CPU:

$ ../bin/recursive -unit:gpu -filter:gaussian -sigma:4 ../images/cactus-512.png ../images/cactus-512-gauss-gpu.png

cactus-512-gauss-gpu.png
Gaussian filter applied to Cactus using the GPU