From the Lab
SLIC Part 3 - Brightness-Shifted Average Colours (Weighted Averaging)
Bernard Llanos — July 12, 2013 - 4:01pm
Method
The images shown in this section are produced by a cross-filtering method similar to the one which I used in my last post (http://gigl.scs.carleton.ca/node/528), except that the colours assigned to the SLIC segments are weighted averages of the segment pixels. The weight of each pixel is the absolute value of the difference between its lightness component (in the CIE L*a*b* colour space) and the average lightness value of the entire image.
Segmented image with a weighted averaging of colours based on lightness relative to the average image lightness (regionSize = 31, regularizer = 0.01)
The weighted averaging process results in an image with slightly more contrast than if the averaging process was unweighted. For comparison, an image produced by unweighted averaging of SLIC segment colours is provided below:
Segmented image with an unweighted averaging of colours (regionSize = 31, regularizer = 0.01)
I initially tried a weighted average based on the absolute value of the difference between a colour's lightness value and the lightness of middle grey, but found that this method was less desirable as it did not adapt to the overall tonal characteristics of the image. A sample image produced by this version of the averaging process is given below. Note that the center of the flower is darkened, which will make the flower look dirty following crossfiltering.
Segmented image with a weighted averaging of colours based on lightness relative to middle grey (regionSize = 31, regularizer = 0.01)
Comparison of Cross-Filtering Results
Cross-filtering of segmented image with weighted averaging of colours based on lightness relative to the average image lightness (regionSize = 12, regularizer = 0.01, mask size of 256 pixels, gamma parameter value of zero)
Cross-filtering of segmented image with unweighted averaging of colours (regionSize = 12, regularizer = 0.01, mask size of 256 pixels, gamma parameter value of zero)
Basic cumulative range geodesic filtering (mask size of 256 pixels, gamma parameter value of zero)
Observations
In my opinion, the combined weighted averaging and crossfiltering process is actually inferior to the basic filtering process without SLIC. Non-crossfiltered images better retain the sharp, high-contrast texture of the flower. Unfortunately, the weighted average of SLIC segment pixels does not produce images which are of significantly higher contrast than those made using an unweighted average. Furthermore, at higher region sizes, both the unweighted and weighted averaging processes yield low-contrast images with desaturated colours.
(Image source: Bernard Llanos)