about gamma correction

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

about gamma correction

1,083 Views
linzhang
Contributor I

I wan't to implement a display contrast adjustment machanism in linear mode,  but I don't know how to do it.

according to Gamma correction on i.MX6 ,  following steps can do gamma correction:

1 - Declare a variable as mxcfb_gamma:

 

struct mxcfb_gamma fb_gamma;

 

2 - Enable the gama correction:

 

fb_gamma.enable = 1;

 

3 - Set the constk and slopek values, where i = 0 to 15 and x and y are respectively the new constk and slopek constant values:

 

fb_gamma.constk[i] = x;

fb_gamma.slopek[i] = y;

 

4 - Open the framebuffer device and call MXCFB_SET_GAMMA:

 

fd_fb = open("/dev/fb0", O_RDWR, 0)

ioctl(fd_fb, MXCFB_SET_GAMMA, &fb_gamma)

 

how do I choose the constk & slopek values to insure the contrast vary in linear mode?

0 Kudos
Reply
2 Replies

796 Views
b36401
NXP Employee
NXP Employee

For linear transfer function you can simply turn off gamma correction.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

796 Views
linzhang
Contributor I

how to turn off gamma correction?

after turning off,  how to adjust display's contrast in linear way?

Can you show me some example codes?

0 Kudos
Reply