

% Input voltages for the set of pictures.
% set2_*.jpg

% Pictures were taken in sets of three

inputs = [0.19;0.30;0.40;0.49;0.65;0.81;0.93;1.11;1.26;1.40;1.55;1.70;1.84;2.00;2.16;2.30;2.46;2.61;2.75;2.90;3.05;3.20;3.40;3.55;3.66];

output_vals = zeros(size(inputs,1), 3);

for idx = 1:3:75;

	idxrow = (idx+2)/3;

	for idx1 = idx:(idx+2)
		filename = sprintf('set2_%05d.jpg', idx);
		im1 = imread(filename);
		
		im1 = im1( 661:1460,436:1235, :);
		%im1 = im1( 431:1198,547:1570, :);
		
		if (idx1 == idx) 
			imsum = double(im1);
		else
			imsum = imsum + double(im1);
		end
	end
	clear im1;
	

	color_val = findmax(imsum ./ 3);
	
	output_vals(idxrow, :) = color_val;
	
	% I guess we'll just take the center patch for now...
	%figure(1); imshow(imsum);
	disp( sprintf('%0.3f -- (%0.4g,%0.4g,%0.4g)', inputs( idxrow) , color_val(1), color_val(2), color_val(3)));
	
end

clear color_val, imsum, idx, idxrow;