Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle lighting differences in merged image #134

Open
spillerrec opened this issue Mar 28, 2019 · 0 comments
Open

Handle lighting differences in merged image #134

spillerrec opened this issue Mar 28, 2019 · 0 comments

Comments

@spillerrec
Copy link
Owner

Some scenes makes each frame lighter or darker in some part of the frame, for example making the top part lighter. If there are enough frames it tends to be able to smooth it out, but otherwise it ends up showing as lines in the image. This most often happen when there are no movement in the start or end (causing the error to build up), or using the skip render where the result ends up being completely broken.

Steps to fix:

  • Make some simulated stitches!
  • Calculate for each pixel in the frame how much it differs from the merged image
  • Based on this for each image, build an average map on how much to correct the effect
  • Most likely will need a few iterations to be correct
  • Apply this map when rendering

Hard questions:

  • What kind of blending is used in those images? (i.e. what to do to reverse it)
  • How do we add that map as a preprocessing step for each image?

Especially the second question is difficult.

  1. We could add it as a mask, but that would make it ambiguous.
  2. We could instantly apply it on all images, but that would ruin the input images if they ended up being wrong.
  3. We could add a new mask type, but that would require us to support it in all renders
  4. We could add support for cached preprocessing in ImageContainer (perhaps even supporting lazy loading so we don't need to keep the original image in memory).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant