To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
To calculate the difference between the value h of an image and values from tab, I used these lines.
h=HSV(:,:,1); d = abs(h - tab(i,1));
Now how can i extract the H of only the region of interest because I want to calculate the difference between the value h of only the region of interest of the image and the values from tab. knowing that bw is the binairy mask of the segmented image. thanks