function [h,s,v] = rgb2hsv(r,g,b)
%RGB2HSV Convert red-green-blue colors to hue-saturation-value.
% H = RGB2HSV(M) converts an RGB color map to an HSV color map.
% Each map is a matrix with any number of rows, exactly three columns,
% and elements in the interval 0 to 1. The columns of the input matrix,
% M, represent intensity of red, blue and green, respectively. The
% columns of the resulting output matrix, H, represent hue, saturation
% and color value, respectively.
%
% HSV = RGB2HSV(RGB) converts the RGB image RGB (3-D array) to the
% equivalent HSV image HSV (3-D array).