Can multiple RAW frames be combined to simulate a longer exposure?
Asked 11/26/2019
1 views
2 answers
0
I want to approximate a longer exposure by combining several shorter RAW frames from a fixed camera position. For example, can three 1/3-second RAW exposures be merged to behave like one 1-second exposure?
My current approach is to sum corresponding RAW pixel values, but the result becomes badly color-shifted (magenta/pink). I also experimented with a sigmoid-based adjustment inspired by how an exposure slider behaves in a RAW editor, but that did not help.
What is the correct way to combine RAW Bayer data for this purpose, and why would simple summing produce a strong color cast?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
6y ago
2 Answers
1
Observations:
You are summing the values of each pixel, but your
exposureAdjust()function assumes that after conditioning, each pixel will be in the range [0, 1). This is not correct. Assume a pixel's value in each of the 3 input images is, say, 50% full-scale (thus, 213 = 8192). Summing that three times yields 3 * 8192 = 24,576. Then the result afternormalized = (x - black_level)/max_pixel_valueis about 1.47, definitely not normalized to less than 1.Remove your sigmoid
adjustment =line until you get the rest of the logic sorted out (such as above). Here is a graph your sigmoid function:Notice that for values of x above about 0.4, increasing x yields quickly smaller values of y (your "adjusted" value. For comparison, a non-adjusted value should correspond to the y = x linear plot on the graph.
For normalization (assuming correctly-bounded inputs of [0,
max_pixel_value - 1]), you should probably reduce the denominator byblack_levelas well (i.e.,normalized = (x - black_level)/(max_pixel_value - black_level)). If you don't then your normalized values are in the range of [0, ∼0.969) (precisely, (213 - 511) / (214 - 1)).
Originally by user11924. Source · Licensed CC BY-SA 4.0
user11924
6y ago
0
Generated from our catalog & community — verify before relying on it.
Yes—if the scene and camera are unchanged, combining several short RAW exposures can approximate one longer exposure. At the RAW level, the basic operation is linear: subtract the black level, then sum or average corresponding sensor values.
The magenta cast suggests your math is no longer staying in a valid linear RAW range, or that white balance / RAW processing is being applied incorrectly. In particular:
- If you sum frames, the result can exceed the sensor’s normal normalized range.
- Your sigmoid-style exposure function is not appropriate for RAW summation; exposure sliders in RAW editors are not a direct model of sensor accumulation.
- A strong color shift may come from applying white balance or other RAW corrections twice, or from using already-corrected data.
A safer workflow is:
- Work on true linear RAW Bayer values.
- Subtract black level first.
- Sum frames if you want the brightness of a longer exposure, or average them if you mainly want noise reduction.
- Apply demosaic, white balance, and tone/exposure adjustments afterward.
Also, an uncorrected Bayer image would tend to look greenish, not magenta, so the pink result strongly points to incorrect color/WB handling rather than the stacking idea itself.
Recommended products
UniqueBot
AI6y ago
Your Answer
Related Questions
Why does dark-frame noise stay nearly constant with exposure time, then rise on long exposures?
Can a basic webcam be used for true long-exposure photography?
What software can improve multi-image stacking for high-ISO noise reduction?
Can I simulate a slower shutter speed by changing RGB values in an image?
When should you stack multiple exposures instead of using one long exposure for noise reduction?
