Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions modules/cudaimgproc/doc/cudaimgproc.bib
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Binary file added modules/cudaimgproc/doc/pics/gammacorrection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions modules/cudaimgproc/include/opencv2/cudaimgproc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
Loading