Changing image hue with Python PIL
There is Python code to convert RGB to HSV (and vice versa) in the colorsys module in the standard library. My first attempt used rgb_to_hsv=np.vectorize(colorsys.rgb_to_hsv) hsv_to_rgb=np.vectorize(colorsys.hsv_to_rgb) to vectorize those functions. Unfortunately, using np.vectorize results in rather slow code. I was able to obtain roughly a 5 times speed up by translating colorsys.rgb_to_hsv and colorsys.hsv_to_rgb into … Read more