function [ dominant_color ] = computeDominantColor( target,mask,alpha )
%COMPUTEDOMINANTCOLOR Summary of this function goes here
%   Detailed explanation goes here

transition_zone = logical(mask(:,:,1) - alpha(:,:,1));

r = squeeze(target(:,:,1));
g = squeeze(target(:,:,2));
b = squeeze(target(:,:,3));

dominant_color(1) = mean(mean(r(transition_zone>0.6)));
dominant_color(2) = mean(mean(g(transition_zone>0.6)));
dominant_color(3) = mean(mean(b(transition_zone>0.6)));

end

