aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsophia.papagiannaki <papagiannaki@stettbacher.ch>2019-10-21 15:59:43 +0200
committersophia.papagiannaki <papagiannaki@stettbacher.ch>2019-10-21 15:59:43 +0200
commitaa0cfd7bf037bdeb36803da960411a68b9da2133 (patch)
treec4d0a5978f1d694d074289f0e871b7d9095bb0c0
parentmatrix depends on chip resolutions (e. g. binning) (diff)
downloado3000-color-pipe-aa0cfd7bf037bdeb36803da960411a68b9da2133.tar.gz
o3000-color-pipe-aa0cfd7bf037bdeb36803da960411a68b9da2133.zip
Gamma value was inversed
out = in ^ gamma
-rw-r--r--gamma_corr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gamma_corr.c b/gamma_corr.c
index c0e5cd4..2a85b1e 100644
--- a/gamma_corr.c
+++ b/gamma_corr.c
@@ -97,7 +97,7 @@ int gamma_corr(struct gamma_data_t *gamma_data) {
*/
if(gamma_table_bitdepth != bit_channel || gamma != gamma_table_init) {
for(i = 0; i <= max_pix; i++) {
- gamma_table[i] = roundf(max_pix*pow(i/((float)max_pix), 1.0/gamma));
+ gamma_table[i] = roundf(max_pix*pow(i/((float)max_pix), gamma));
}
gamma_data->gamma_table_bitdepth = bit_channel;
gamma_data->gamma_table_init = gamma;
@@ -110,4 +110,4 @@ int gamma_corr(struct gamma_data_t *gamma_data) {
gamma_corr16(img_gamma, img_in, height, width, gamma_table, is_color);
}
return 0;
-} \ No newline at end of file
+}