I think that there is missing **if** for "the [H parameter computation](https://docs.opencv.org/4.5.1/de/d25/imgproc_color_conversions.html#color_convert_rgb_hsv). If R = G = B the H should be 0. Regards