% By Ramón Morneo jiménez
% natafresa@gmail.com
% Computational Intelligence Group
% http://www.ehu.es/ccwintco

% If you are going to use this function in some plublication, please refer it as:

%@INCOLLECTION{demazeau_color_2010,
%  author = { Ramón Moreno and Manuel Graña and Alicia {d’Anjou}},
%  title = {A Color Transformation for Robust Detection of Color Landmarks in
%	Robotic Contexts},
%  booktitle = {Trends in Practical Applications of Agents and Multiagent Systems},
%  publisher = {Springer Berlin / Heidelberg},
%  year = {2010},
%  volume = {71},
%  series = {Advances in Soft Computing},
%  pages = {665--672},
%  url = {http://dx.doi.org/10.1007/978-3-642-12433-4_78}
%}


function img2 = SF2(img)

magnitud = (max(img,[],3)-min(img,[],3));
hsv = rgb2hsv(img);
hsv(:,:,3)=double(magnitud)/255;
img2 = hsv2rgb(hsv);
