Publications / 2019 / Parallel Curvature Filter for High Performance Image Processing

Parallel Curvature Filter for High Performance Image Processing

Wei Pan, Yuanhao Gong, Guoping Qiu
IWAIT 2019, vol. 11049 (SPIE), 282–287

In one sentencePCF runs the curvature filter’s eight per-pixel distance computations as parallel convolutions on a GPU, so one graphics card processes 33.2 gigapixels per second, fast enough for real-time video and biomedical imaging.

The problem

The curvature filter smooths and denoises an image by implicitly reducing a curvature energy, such as Gaussian curvature, mean curvature or total variation. It treats the image as a surface and repeatedly applies a cheap local operator to every pixel, each pass lowering the regularisation energy. The filter is fast, but many images that need enhancing are high-resolution or must be processed in real or near-real time, and on a CPU a large image such as 2048 × 2048 still takes minutes.

The most expensive part of the filter is a set of eight convolutions over the image. Inspired by the way GPUs run the convolutions of convolutional neural networks, the authors parallelise these convolutions on the GPU.

How it works

Each iteration of the curvature filter enumerates eight candidate moves for every pixel, picks the smallest one and applies it. PCF computes the eight candidates for all pixels at once with convolution kernels on the GPU.

  1. The image as a surface. The image intensity U is interpreted as a surface over the pixel grid. The curvature regularisers all work on the local 3 × 3 neighbourhood around each pixel.
  2. Eight tangent-plane projections. A surface can be locally approximated by its tangent plane. In the 3 × 3 neighbourhood, eight tangent planes through neighbouring pixels are enumerated, giving eight projection distances d1 … d8 for the centre pixel.
  3. Eight convolutions on the GPU. Each distance is computed for every pixel at once as a convolution of the image. These eight convolutions are the most computationally expensive part of the algorithm; PCF runs them in CUDA and uses the GPU’s shared memory to accelerate them.
  4. Pick the smallest distance and update. For every pixel, the distance dm with the smallest magnitude is selected (ABSMIN) and added to the pixel: Ut+1 = Ut + dm. The smallest distance indicates the closest fit to the desired geometry and to the original image.
  5. Iterate. Repeating the update regularises the image surface step by step, which the paper shows by plotting the intensity along one line of the image after 10 and 30 iterations.
Flow diagram: eight 3 × 3 projection patterns, a red GPU box with convolution kernels turning a photo into a stack of maps d1 to d8, an ABSMIN step producing map dm, and a plus node feeding back to the image.
The parallel curvature filter flow: eight projection distances are enumerated in a 3 × 3 neighbourhood and computed for every pixel by convolution on the GPU; the smallest one (dm) updates the image in each iteration. Fig. 1 of the paper.

Results

The CUDA implementation was run with GPU block sizes from 16 to 32 on an NVIDIA GeForce GTX 1080 Ti (3,584 CUDA cores, 11,264 MB of global memory, 49,152 bytes of shared memory per block) and compared with the original curvature filter on an Intel Xeon E5-1620 v4 CPU at 3.50 GHz. In Fig. 3 the computation time grows with the number of iterations on both, but far more slowly on the GPU. The authors conclude that this speed makes the filter suitable for real-time applications such as video processing and biomedical image processing.

The paper also applies Gaussian-curvature and mean-curvature versions of PCF to a photograph and plots the intensity along one line after 10 and 30 iterations. In both, the profile becomes smoother as iterations accumulate; judging from these profiles, the authors find the mean-curvature PCF more efficient at smoothing than the Gaussian-curvature PCF (a comparison of smoothing, not of running time).

Line chart of computation time in seconds against iteration count from 0 to 3000: the dashed blue CPU line rises to about 87 s, the solid red GPU line stays below about 7 s.
Computation time for the same image on CPU and GPU as the number of iterations grows. Fig. 3 of the paper.
Three versions of a photo of a crowd in front of a large sculpture, with an orange dashed line across it, and below each the intensity profile along that line, becoming smoother from left to right.
Mean-curvature PCF on a photo: the original, then after 10 and 30 iterations. The plots show the intensity along the orange dashed line. Fig. 5 of the paper.

Cite

@inproceedings{pan2019parallel,
  title={Parallel curvature filter for high performance image processing},
  author={Pan, Wei and Gong, Yuanhao and Qiu, Guoping},
  booktitle={International Workshop on Advanced Image Technology (IWAIT) 2019},
  volume={11049},
  pages={282--287},
  year={2019},
  organization={SPIE},
  doi={10.1117/12.2520823}
}
Type
Paper Conference
Topic
Geometry Processing
Venue
IWAIT 2019, vol. 11049 (SPIE), 282–287
Year
2019
DOI