diff --git a/modules/cudaimgproc/doc/cudaimgproc.bib b/modules/cudaimgproc/doc/cudaimgproc.bib index cb36ade7f5..809c2c53f6 100644 --- a/modules/cudaimgproc/doc/cudaimgproc.bib +++ b/modules/cudaimgproc/doc/cudaimgproc.bib @@ -8,3 +8,12 @@ @article{Allegretti2019 year={2019}, publisher={IEEE} } + +@article{BT.709, + title={Recommendation ITU-R BT.709-6}, + author={ITU}, + pages={3}, + year={2015}, + publisher={ITU} + url={https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-6-201506-I!!PDF-E.pdf} +} diff --git a/modules/cudaimgproc/doc/pics/gammacorrection.png b/modules/cudaimgproc/doc/pics/gammacorrection.png new file mode 100644 index 0000000000..9dbd000961 Binary files /dev/null and b/modules/cudaimgproc/doc/pics/gammacorrection.png differ diff --git a/modules/cudaimgproc/include/opencv2/cudaimgproc.hpp b/modules/cudaimgproc/include/opencv2/cudaimgproc.hpp index 01e7c41ca9..cc39ebcd22 100644 --- a/modules/cudaimgproc/include/opencv2/cudaimgproc.hpp +++ b/modules/cudaimgproc/include/opencv2/cudaimgproc.hpp @@ -154,6 +154,19 @@ CV_EXPORTS void swapChannels(InputOutputArray image, const int dstOrder[4], Stre @param dst Destination image. @param forward true for forward gamma correction or false for inverse gamma correction. @param stream Stream for the asynchronous version. + +Gamma correction is conformant to BT.709 @cite BT.709 with γ=0.45. + +For the forward transform, RGB values are normalised to fit in the range L=[0..1], then: +- For L < 0.018 + + V = 4.5*L +- For L >= 0.018 + + V = 1.099 * L^0.45 - 0.099 + +With V then being scaled back to [0..255]. + +![image](pics/gammacorrection.png) + */ CV_EXPORTS_W void gammaCorrection(InputArray src, OutputArray dst, bool forward = true, Stream& stream = Stream::Null());