Additions
Additions copied to clipboard
Calculation of value
Hello, I find the calculation of value of RGB->HSV is not correct. I change it to
*v = (max+min)/2.f;
ref: http://en.wikipedia.org/wiki/HSL_and_HSV