From the Lab
SLIC Part 5 - Random Colour Casts
Bernard Llanos — July 16, 2013 - 9:51am
Having spent some time exploring the use of colour averaging within SLIC-generated segments, I am now investigating what happens if I apply colour offsets to the pixels within segments. As a preliminary test, I generated images where each SLIC segment was assigned a random colour vector that was added to all of the segment's pixels (in the RGB colour space). Colour components were then clipped to the range of 0-255. The components of the colour offset vectors were each normally-distributed around zero, and had the same standard deviations.
Segmented image with random colour offsets (regionSize = 19, regularizer = 0.01, offset standard deviation = 32)
Using the above image as the colour data for averaging, and the source image (shown at http://gigl.scs.carleton.ca/node/528) as the data for filter mask generation, I crossfiltered using the cumulative range geodesic filter to produce the following result:
Cross-filtering with a filtering mask size of 256 pixels and gamma parameter value of zero (regionSize = 19, regularizer = 0.01, offset standard deviation = 32)
I find that the crossfiltering output from random colour offsets is much nicer than the output from random colour assignments (see http://gigl.scs.carleton.ca/node/527). If the colour offsets were more coherent, then crossfiltering might produce pleasing recolorations of an image. In particular, care should be taken to avoid placing contrasting colour offsets side-by-side at small SLIC region sizes, as the blending effect will produce a more subdued output colour in these areas.
(Image source: Bernard Llanos)