Gamma Correction You have an intensity value I with a range [0,1] and there is a perceived intensity p Ideal case - 0.5 is half has bright as 1.0 (THIS IS NOT THE REALITY THOUGH) Therefore we have to use the gamma function p = I^gamma Gamma Correction Given a pixel intensity I, the displayed intensity after gamma correction is equivalent to I_d = I^(1/gamma) There will be 3 different coordinates systems that will be encountered during this class. Image Coordinate System In an image coordinate system, the origin is at the top left corner. We use the following formula I_r(x,y) = data[3*(x + width*y)] for RED I_g(x,y) = data[3*(x + width*y) + 1] for GREEN I_b(x,y) = data[3*(x + width*y) + 2] for BLUE OpenGL Texture Coordinate System OpenGL textures place the origin (0,0) in the lower left corner, so to convert from the Image Coordinate System, we must use the following function I_{LL}(x,y) = I(x_{LL}, image_height - y_{LL}) OpenGL/Viewport/Window Coordinate System Has the origin in the center and has a bounding box [-1,1] in both dimensions. The function to transform points from the Image Coordinate System to the OpenGL/Viewport coordinate system is x_new = 2.0 * (x_image + 0.5) / width - 1.0 y_new = - [ 2.0 * (y_image + 0.5) / height - 1.0 ] Image Compositing & Blending - the process of overlaying one image onto another (used a lot in green screen movies) r=[0,1] g=[0,1] b=[0,1] alpha=[0,1] alpha is the transparency value where alpha=0 -> fully transparent alpha=1 -> fully opaque alpha values are useful for blending images and compositing