Questions tagged [gamma]

Gamma questions pertain to non-linear responses in the display chain. The application, adjustment or compensation for gamma, as well as the consequences of doing or not doing so are common subjects.

164 questions
5
votes
2 answers

PHP GD2: how to maintain alpha channel transparency and correct gamma

I was intrigued by this discussion of image scaling and subsequently found out that the PHP code I'm using to create thumbnails from uploaded images suffers from the same problem. I decided to try the PHP fix posted near the bottom (converting gamma…
Ty W
  • 6,694
  • 4
  • 28
  • 36
5
votes
1 answer

OpenGL: Gamma corrected image doesn't appear linear

I'm using OpenGL for rendering, and when I write linear values to the default framebuffer (without any gamma correction) they appear linear on my monitor. This goes against everything I thought I knew about gamma correction (as explained here:…
KTC
  • 420
  • 5
  • 15
5
votes
1 answer

How to scale pixels in an image to adjust brightness?

I have a grayscale image from a photograph. I've determined that certain parts of the image are underilluminated, and that a pixel with luminance Y = 0.8 should actually be adjusted to 90% grey, i.e., that pixel should be given luminance 0.9. My…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
5
votes
1 answer

Illumination normalization in OpenCV

I am working on a face recognition project. I have pictures with different lighting so I need to do illumination normalization. I read a paper which which claims to do illumination normalization. The paper describe the following function and values.…
Shah
  • 661
  • 2
  • 9
  • 19
4
votes
1 answer

Gamma-curve experiment -- convert 2.2 to opposite of 1.8?

The Motorola Photon is infamous for exhibiting what others have called "black crush" -- when viewing pictures, most of the detail in dark parts of the image is flattened out to black. Up to now, pretty much everyone has blamed it on the Pentile…
Bitbang3r
  • 6,826
  • 5
  • 27
  • 40
4
votes
1 answer

OpenCV Gamma Correction exr

How can I gamma correct a 32bit .exr file to look like the desired result in the image of this question? Basically converting from liner to sRGB somehow? I got this code(and modified it a bit) from convert EXR to JPEG using ImageIO and Python I…
johancc
  • 87
  • 8
4
votes
2 answers

iOS Metal. Why does simply changing colorPixelFormat result in brighter imagery?

In Metal on iOS the default colorPixelFormat is bgra8Unorm. When I change format to rgba16Float all imagery brightens. Why? An example: Artwork MTKView with format bgra8Unorm. Texture-mapped quad. Texture created with SRGB=false. MTKView with…
dugla
  • 12,774
  • 26
  • 88
  • 136
4
votes
0 answers

OpenGL gamma correction with GL_FRAMEBUFFER_SRGB

I am writing a Blinn Phong (LearnOpenGL tutorial) lighting and trying to get gamma corrected colors as final result. Before i start digging about gamma correction, my lighting looks like this: Then i spend all day reading about sRgb colorspace, and…
yuris89
  • 63
  • 4
4
votes
3 answers

How Do I Remove Gamma Information From A PNG

I am trying to produce images without gamma information so that IE8 can display them correctly. Used the following code but the result is a distorted image that looks nothing like the original image. ///PNG PNGEncodeParam params=…
giscope
  • 77
  • 1
  • 8
4
votes
2 answers

Direct2D - How to do gamma-correct transparency (alpha) with bitmaps

I'm drawing bitmaps in Direct2D. The bitmaps utilize transparency (alpha channel). The blending looks wrong. As a test I loaded a pure black png image with 50% transparency and drew it over a white background. The result is pixels with a Red, Green,…
Jeff McClintock
  • 1,242
  • 10
  • 27
4
votes
1 answer

Maximum Likelihood Estimator for a Gamma density in R

I just simulated 100 randoms observations from a gamma density with alpha(shape parameter)=5 and lambda(rate parameter)=5 : x=rgamma(100,shape=5,rate=5) Now, I want to fin the maximum likelihood estimations of alpha and lambda with a function that…
Mercier
  • 91
  • 3
  • 10
4
votes
1 answer

Estimate ratio of two gamma functions when individual functions return inf value

I'm estimating the ratio of two gamma functions. Both estimates for gamma(x) and gamma(y) are very large ( > 10^300) but the ratio of the two should be fairly small. from scipy.special import gamma gamma(x) / gamma(y) Unfortunately, there is a…
user3439329
  • 851
  • 4
  • 10
  • 24
4
votes
1 answer

Gamma correction doesn't look properly corrected, is this linear?

I want to implement gamma correction to my OpenGL lighting, but with gamma correction applied, my results do not seem linear at all. I also found OpenGL: Gamma corrected image doesn't appear linear which is very similar to my issue, but hasn't yet…
ABHAY
  • 221
  • 2
  • 12
4
votes
1 answer

Error while testing glm with gamma family

I'm currently working on toxicity of shellfish on six french bays in 10 years.. I created a proxy that represents the quantity of toxin that appeared during the year. Now i would like to explain this toxicity by various parameters. For the moment, i…
bhuss
  • 119
  • 1
  • 1
  • 11
4
votes
3 answers

gamma or log gamma function in C or C

I am seeking a C or C++ version of gamma and log gamma functions. Are there any code pieces or libraries recommended? If possible, I want to know the principle of the implementations. Thank you!!!
kimi
  • 123
  • 3
  • 6
1
2
3
10 11