1. A method for generating an HDR image of a scene, wherein a current frame (f i ) imaging said scene has been captured under a current exposure (E i ) and a previous frame (f i+1 ) imaging said scene has been captured before said current frame (f i ), said method comprising: setting an exposure (E i+1 ) for a next frame (f i+1 ) as a function of said current exposure (E i ), of a first brightness distribution (Hfull i ) of colors of pixels of said current frame (f i ) and of a second brightness distribution (Hmotion i ) of colors of these pixels weighted by motion of these pixels, wherein said motion is evaluated for these pixels in comparison with said previous frame (f i ), capturing said next frame (f i+1 ) under said set exposure (E i+1 ), merging said next frame (f i+1 ) with at least said current frame (f i ) into an HDR image.