Implementing Anisotropic Kuwahara Filtering for Real-Time Image Abstraction
Anisotropic Kuwahara filtering is a powerful technique for transforming photorealistic images into stylized, “painterly” abstractions. By adapting the filter’s shape and orientation to the local image structure, it eliminates the blocky artifacts seen in the original Kuwahara filter while preserving sharp edges and directional features. 1. From Classic to Anisotropic Kuwahara
The original Kuwahara filter divides a square window into four sub-regions and assigns the center pixel the mean value of the region with the lowest variance. While effective for denoising, it often produces block artifacts and is unstable in noisy conditions. The Anisotropic version improves this by:
Structure Tensors: Calculating the local orientation and anisotropy (directionality) of the image to determine the filter’s shape.
Elliptical Weighting: Replacing square sub-regions with elliptical weighting functions that align with the image’s flow.
Weighted Smoothing: Using a nonlinear combination rule that prioritizes homogeneous regions to enhance sharp boundaries. 2. Real-Time Implementation Strategies
To achieve real-time performance, particularly for video processing at 60 FPS or higher, developers often utilize GPU-based acceleration.
Leave a Reply