Saturday, 2 June 2018

Creating a synthetic image from an original image with a given shutter speed


I have an original jpeg image captured by a camera. I want to change the photo to another image so that the new image resembles the one which would have been taken with a camera with a different shutter speed. So basically I want to create images with a predetermined shutter speed of a camera.



Answer



You can't easily do this without a 3D model of the scene. A single photograph does not have the information you need. Now, it is possible using modern ML/AI techniques to have a system which infers ("makes up") this information, but it would be non-trivial and while there is research in this area, there aren't any off-the-shelf programs which do so.


Motion blur depends on:




  1. Distance to the object.

  2. Speed at which it is moving.

  3. Magnification — how big the object appears on your sensor.


Only the last thing can be figured out from optical properties — and it turns out to be relatively complex with real-world cameras rather than just in theory, so that's not something you can necessarily just infer from metadata.


The other things you just don't know from a photograph. Something that is nearby and moving slowly will have the same amount of apparent blur as something far away and moving quickly. The "ground speed" of the moon is something like 1000 miles per hour, but you can take an exposure of several seconds before any motion blur is apparent. Imagine trying that with baseball going at that speed right past your camera.


Without intelligence — either painstaking human work, or painstaking AI work — there's no way to tell if a photograph is of the moon or of a baseball.


I know this isn't what you want to hear, but... there you go. All hope is not lost, though because people are definitely interested in and working on this topic — it's the same thing that's needed to convincingly render other kinds of effects like "fake bokeh" that are in high demand in smartphones.


As a first step, check out this paper, and related papers on Google Scholar.



You may also try Artificial Intelligence — that community may be able to help you with something like "How can I make a depth model of a scene from a single photograph?". (Although you're going to get better results the more you know on your own first.)


Once you have that model, you can go from there. The next thing you'll need is some way to assign speed to the various objects. Trying to do this by computing backwards from existing motion blur is an extra level of challenge — it will probably be easier to go from an "everything frozen" starting image and only add blur, based on artificial parameters you assign.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...