% Calculate the raduis of three coordinate in color space H_R, V_R, C_R

function [hr, vr, cr] = get_radius(im2)

hm = im2(:, :, 1);
% Histogram of H 
[n, x] = hist(hm);

count = 0;
for i = 1:size(x, 1)-1
    count = count+x(i+1)-x(i);
end
hr = count/size(x,1);

vm = im2(:, :, 2);
% Histogram of V
[n, x] = hist(vm);

count = 0;
for i = 1:size(x, 1)-1
    count = count+x(i+1)-x(i);
end
vr = count/size(x,1);

cm = im2(:, :, 3);
% Histogram of C
[n, x] = hist(cm);

count = 0;
for i = 1:size(x, 1)-1
    count = count+x(i+1)-x(i);
end
cr = count/size(x,1);

