gpufilter
GPU-Efficient Recursive Filtering and Summed-Area Tables
|
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 has to be extracted from the next block in column using the head operator (cf. head()) on that block.
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 (in red) and (in blue). Stage S.2 completes prologues and computes scalars (in yellow). Stage S.3 completes prologues . Finally, stage S.4 reads the input and completed prologues, then computes and stores the final summed-area table.
For our test experiments we use the following cactus 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
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
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
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