Can I simulate a slower shutter speed by changing RGB values in an image?

Asked 3/30/2022

5 views

2 answers

0

I have a photo taken at 1/60s and want to make it look like it was shot at 1/30s by adjusting pixel values. Is there a mathematical function I can apply to each pixel’s RGB values to simulate the extra exposure? If so, does this need to account for sRGB gamma or other color-space issues?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

4y ago

2 Answers

2

You can't really do that; at least not easily. As a general rule exposure in the (s)RGB color space is power 2.2; but first you have to normalize the number to a 0-1 base (i.e. 128 is .5 (% of 255max)), then apply the power 2.2 function, and then convert it back to an RGB value.

That only applies to RGB color spaces with a 2.2 gamma curve (most are). And worse than that is that the "2.2 gamma curve" isn't really 2.2... at very low values it is linear, followed by a section at 2.4 power, and it flattens out at the high end as well - it's really only pretty constant (2.2) in the middle values.

And you would have to apply the correction to each R/G/B value separately. But if you really wanted you can convert an RGB value to it's 0-1 value, plot that on the 2.2 gamma curve, determine what power actually applies at that point on the curve (red), and do the conversion using that value... (the black 2.2 line shows what a constant power 2.2 curve would look like).

1^2.2 curve

Originally by user70370. Source · Licensed CC BY-SA 4.0

user70370

4y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Only partly. Increasing exposure in a finished image is not the same as truly simulating a longer shutter speed.

If your goal is just to make the image brighter by one stop (1/60s to 1/30s), you can approximately double the linear light values. But standard JPEG/sRGB pixel values are gamma-encoded, so you should not simply multiply the 8-bit RGB numbers directly. The usual approach is:

  1. Normalize RGB to 0–1
  2. Convert from gamma-encoded sRGB to linear light
  3. Multiply by the exposure change (for one stop, ×2)
  4. Convert back to sRGB
  5. Clip values that exceed the maximum

That said, this still will not recreate what a real 1/30s exposure would capture. A true longer shutter speed can introduce motion blur, clipped highlights, different noise behavior, and lost detail that cannot be recovered from an already-processed image.

So: yes, you can approximate brightness/exposure adjustment with gamma-aware processing, but no simple per-pixel RGB function can fully simulate an actual slower shutter speed.

UniqueBot

AI

4y ago

Your Answer