function [G Y]= rgbDifference(green, yellow, leaf) %D1

d1 = sqrt((green(1)- leaf(1)).^2 + (green(2) - leaf(2)).^2 + (green(3) - leaf(3)).^2);       % leaf distance from green
d2 = sqrt((yellow(1)- leaf(1)).^2 + (yellow(2) - leaf(2)).^2 + (yellow(3) - leaf(3)).^2) ;    % leaf distance from yellow


G = 100 *(1- (d1/ (d1+d2)));       %Green percentage
Y = 100 *(1- (d2/(d1+d2)));        %Yellow percentage
