资源简介
常见颜色校正算法,包括 Grey-World, Shades of Gray, max-RGB, and Grey-Edge,可正常运行。
代码片段和文件信息
% shows example of illuminant estimation based on Grey-World Shades of
% Gray max-RGB and Grey-Edge algorithm
%some example images
input_im=double(imread(‘c:\matlab\work\train_he.bmp‘));
%input_im=double(imread(‘cow2.jpg‘));
%input_im=double(imread(‘dog3.jpg‘));
figure(1);imshow(uint8(input_im));
title(‘input image‘);
% Grey-World
[wRwGwBout1]=general_cc(input_im010);
figure(2);imshow(uint8(out1));
title(‘Grey-World‘);
%imwrite(uint8(out1)‘c:\matlab\work\images\nighttime images\411.jpg‘);
% max-RGB
[wRwGwBout2]=general_cc(input_im0-10);
figure(3);imshow(uint8(out2));
title(‘max-RGB‘);
%imwrite(uint8(out2)‘c:\matlab\work\images\nighttime images\412.jpg‘);
% Shades of Grey
mink_norm=5; % any number between 1 and infinity
[wRwGwBout3]=general_cc(input_im0mink_norm0);
figure(4);imshow(uint8(out3));
title(‘Shades of Grey‘);
%imwrite(uint8(out3)‘c:\matlab\work\images\nighttime images\413.jpg‘);
% Grey-Edge
mink_norm=5; % any number between 1 and infinity
sigma=2; % sigma
diff_order=1; % differentiation order (1 or 2)
[wRwGwBout4]=general_cc(input_imdiff_ordermink_normsigma);
figure(5);imshow(uint8(out4));
title(‘Grey-Edge‘);
imwrite(uint8(out2)‘c:\matlab\work\images\nighttime images\414.jpg‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-06-10 22:23 ColorConstancy\
文件 71519 2007-03-25 20:20 ColorConstancy\building1.jpg
文件 23207 2007-05-16 15:48 ColorConstancy\building1_cc.jpg
文件 1294 2015-06-10 10:22 ColorConstancy\ColorConstancyDemo.m
文件 48214 2007-03-25 20:21 ColorConstancy\cow2.jpg
文件 303 2005-10-19 11:23 ColorConstancy\dilation33.m
文件 48346 2007-03-25 20:21 ColorConstancy\dog3.jpg
文件 1143 2005-06-10 15:33 ColorConstancy\fill_border.m
文件 974 2006-08-08 17:18 ColorConstancy\gDer.m
文件 3143 2007-05-16 14:35 ColorConstancy\general_cc.m
文件 830 2007-05-16 14:12 ColorConstancy\norm_derivative.m
文件 411 2005-04-29 15:14 ColorConstancy\set_border.m
评论
共有 条评论