OpenCV implementations of adjust_hue and adjust_saturation
See original GitHub issueGreat repo.
But it seems that adjust_hue
and adjust_saturation
functions are exactly the PIL implementations (PyTorch official implementations). I wonder are there OpenCV implementations for these two functions, since the adjust_hue
is rather slow, and adjust_saturation
is a little slow when compared with adjust_contrast
and adjust_brightness
functions.
In my testing cases, given one 224x224x3 input, adjust_contrast
takes about 188 µs, adjust_saturation
takes about 2.33 ms, and adjust_hue
takes about 6.99 ms.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
kornia.enhance.adjust
This implementation follows PIL convention. The input image and factor is ... [docs]class AdjustSaturation(Module): r"""Adjust color saturation of an image.
Read more >Changing Colorspaces - OpenCV
In this tutorial, you will learn how to convert images from one color-space to another, like BGR \leftrightarrow Gray, BGR \leftrightarrow HSV, etc....
Read more >Automatic color correction with OpenCV and Python
Implementing automatic color correction with OpenCV · The path to the --reference image contains the input scene in the “ideal” conditions to ...
Read more >How to adjust Brightness, Contrast, Sharpness and Saturation ...
Example 2: How to adjust Contrast. ImageEnhance.Sharpness(). Example 3: How to adjust Sharpness. ImageEnhance.Color(). Example 4: How to adjust Saturation.
Read more >Changing the contrast and brightness of an image using Python
In this article, we will see how we can implement our theory in a beautiful code using OpenCV Python,. Before starting let's try...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve done a quick check, and the way in which PIL and OpenCV calculate HSV from RGB images is quite different. This will make a 1->1 conversion between adjust_hue in PIL and OpenCV not possible.
@cleardusk I tried your solution and it is not as good as Pillow’s version. It gives a lot of bad artifacts like this: