From aa0cfd7bf037bdeb36803da960411a68b9da2133 Mon Sep 17 00:00:00 2001 From: "sophia.papagiannaki" Date: Mon, 21 Oct 2019 15:59:43 +0200 Subject: Gamma value was inversed out = in ^ gamma --- gamma_corr.c | 4 ++-- 1 file 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 +} -- cgit v1.2.1