Ghosting-free multi-exposure image fusion for static and dynamic scenes