Code covered by the BSD License  

Highlights from
Color Image Processing Webinar Files

image thumbnail

Color Image Processing Webinar Files



10 Jul 2007 (Updated )

Presentation file and color calibration demo.

% Copyright 2007 The MathWorks, Inc.
function [redCurve greenCurve blueCurve] = createCurves(...
                            observedRed, observedGreen, observedBlue,...
                            chartRed, chartGreen, chartBlue)
% This function performs cubic spline interpolant curve fitting.

method = 'splineinterp';
redOut = fit(observedRed, chartRed/2^8, method);
greenOut = fit(observedGreen, chartGreen/2^8, method);
blueOut = fit(observedBlue, chartBlue/2^8, method);

redCurve = uint8(redOut(1:observedRed(end)));
redCurve(end+1:2^8) = redOut(observedRed(end));

greenCurve = uint8(greenOut(1:observedGreen(end)));
greenCurve(end+1:2^8) = greenOut(observedGreen(end));

blueCurve = uint8(blueOut(1:observedBlue(end)));
blueCurve(end+1:2^8) = blueOut(observedBlue(end));

Contact us