-
Notifications
You must be signed in to change notification settings - Fork 59
Spatial cielab
Ordinary CIELAB color difference (see Metrics) compares two colors pixel by pixel, as if the eye had unlimited spatial resolution for color errors. In practice the eye is far less sensitive to high-spatial-frequency color error than to high-spatial-frequency luminance error — a compression artifact that shifts colors slightly in a fine-textured region is much less visible than the same shift over a large uniform area. Spatial CIELAB (S-CIELAB) accounts for this: it filters the color-opponent channels with a model of the eye's reduced high-frequency color sensitivity before computing an ordinary CIELAB difference, so the resulting error map reflects perceived rather than pixelwise color error.
The core computation is implemented in metrics/scielab/:
-
scielab— the main entry point, comparing two images (or two scenes) and returning a spatial CIELAB error map. -
preSCIELAB— applies the spatial (opponent-color) filtering step. -
scComputeSCIELAB— the lower-level computation given the filtered data. -
scielabRGB— a convenience wrapper for comparing two RGB images directly, handling the color-space conversion for you. -
scielabMask— restricts the comparison to a region of interest.
% errorImage is the S-CIELAB error at each pixel, comparing image1 to
% image2 under the given display's calibrated primaries.
errorImage = scielabRGB(image1, image2, displayCreate('LCD-Apple'));t_metricsScielab and t_metricsScielab2 in
tutorials/metrics/ cover this calculation; unlike most tutorials linked
elsewhere in this wiki, they are not yet published as HTML — read the
source directly:
t_metricsScielab.m,
t_metricsScielab2.m.
Back to Metrics.
ISETcam development is led by Brian Wandell's Vistalab group at Stanford University and supported by contributors from other research institutions and industry.