- added detection of edges to be color corrected
git-svn-id: http://moon:8086/svn/matlab/trunk@139 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 164 KiB |
@@ -28,7 +28,7 @@ im = im2double(imread(img_name));
|
||||
im_rgb = imresize(im, 1);
|
||||
se = strel('square',3)
|
||||
|
||||
ref_rgb = toRef([0 0.5 1], size(im_rgb));
|
||||
ref_rgb = toRef([0.0 0.5 0.95], size(im_rgb));
|
||||
|
||||
close all;
|
||||
|
||||
@@ -36,11 +36,11 @@ figure;
|
||||
imshow(ref_rgb);
|
||||
|
||||
figure;
|
||||
despilled_rgb_matte = im_rgb - k_sb*ref_rgb;
|
||||
despilled_rgb_matte = max(0, im_rgb - k_sb*ref_rgb);
|
||||
imshow(despilled_rgb_matte);
|
||||
|
||||
figure;
|
||||
despilled_rgb = im_rgb - k_ds*ref_rgb;
|
||||
despilled_rgb = max(0, im_rgb - k_ds*ref_rgb);
|
||||
imshow(despilled_rgb);
|
||||
|
||||
figure;
|
||||
@@ -55,6 +55,10 @@ figure;
|
||||
edges = coloredges(despilled_rgb_matte, ref_rgb);
|
||||
imshow(edges);
|
||||
|
||||
figure;
|
||||
final = max(0, despilled_rgb.*matte - edges.*ref_rgb);
|
||||
imshow(final);
|
||||
|
||||
imwrite(final, 'final.png','png','alpha', matte);
|
||||
imwrite(matte, 'alpha.png','png');
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 736 KiB After Width: | Height: | Size: 666 KiB |
Reference in New Issue
Block a user