A simple nonlinear non-iterative operator that adds a painting effect to an image is proposed. An example of how the operator works is presented below. A larger set of examples is available here
Output of the proposed operator
A circular local neighborhood around each pixel is divided in N sectors, on which N weighted local averages and N weighted local standard deviations of the input image are computed. For each pixel, the output is computed as a linear combination of the corresponding N local averages, whose coefficients are decreasing functions of the corresponding local standard deviations.
Fig. 1 illustrates the behavior of the proposed operator. On areas that contain no edges (case a) the output is close to the aritmetic mean of the local average values. In this case the operator behaves very similarly to a Gaussian filter, thus texture and noise are averaged out. In the presence of an edge (case b), the sectors that cross it give higher local standard deviation values than the other sectors. Thus, the sectors intersected by the edge (5 – 8) give a smaller contribution to the linear combination. Similarly, in the presence of corners (case c) and sharp corners (case d), only those sectors which fall inside the corner (6, 7 for case c and 1 for case d) give an appreciable contribution whereas the other sectors have a negligible effect.
The choice of using circular sector shaped regions for computing the local averages is particularly suitable for preserving edges and sharp corners. The proposed approach allows, for each pixel, an automatic selection of the sectors which provide the best coverage of either the edge or the corner under analysis.
Fig. 1. Illustration of the behavior of the proposed operator.
For a more detailed exposition of the proposed operator, we refer to the following ariticle:
G. Papari, N. Petkov, P. Campisi Artistic Edge and Corner Preserving Smoothing
IEEE Transactions on Image Processing, 16(10) : 2449-2462, 2007
A Matlab imlementation of the proposed operator is available here