I have been developing a new application named Overmix, which attempts to improve the quality of anime screenshot stitching. This article will shortly explain what stitching is, what issues affect the quality and how Overmix tries to fix those. At the end a short summery of the results for the current progress is given.
Background
One common animation technique is panning where the camera moves/pans over the image, showing only a part of it at a given time:
(Shot on YouTube: http://youtu.be/DsHjblyEG88?t=6m25s)
Very little movement actually happens during the shot, in fact only the mouth is moving (presumably to reduce animation costs). This makes it possible to combine the frames together to one large image, which is known as “stitching”.
Source quality
The issue is however that more often than not, the video quality isn’t that great. The video has been compressed and especially if the source is a TV-transmission or webcast, visual artifacts can be quite noticeable:
The two most significant artifacts with anime encodes is noise (shown above) and color banding/posterization (shown below).
Reducing artifacts
A stitch is normally done by taking two frames, finding the offset between the two images and then soften the edges between the images to make the transition less apparent (which is usually done by applying a gradient on the alpha channel).
Since this is a time consuming process, as few frames as possible is used. The idea is to do the opposite, use as many frames as possible. The reason is that the artifacts are not static, for every frame they differ slightly. In result, every frame carries a slightly different set of information. The goal is then to derive the original information, based on this set of inconsistent information.
Just by using the average, we can get quite decent results:
(Right is a single frame, left is the average of all unique frames.)
Results
Noise artifacts has shown to nearly disappear completely when simply averaging every frame with each other, even when the source has a significant amount of noise artifacts. Color banding is also reduced but with much more varying amounts.
Even with modern TV-encodes, stitches sees a significant improvement from using this technique and can visually be tell apart at normal magnification. Surprisingly, even when using good BD-encodes there is usually a slight improvement, but normally requires 2-4 times magnification to be noticeable.
It has shown that it often is not possible to make a perfect alignment when sticking to the pixel grid. This causes the images to be slightly more blurry than originally. It is an area which still requires work.
Using the average to derive the result is not always desirable, as the encode might contain information not related to the image. Such information could be subtitles, TV logos or simply errors in the source. See the following image as example, the most-right column of pixels was completely black and shows up as lines in the averaged image.
However the currently devised algorithms has a tendency to choke on the slight misalignment mentioned previously and cause unwanted artifacts. If this is solved best by fixing the misalignment or by improving the algorithm is up to discussion.
Binaries and source code
Overmix is licensed as GPLv3 and can be found here: Overmix on Github
Binaries for Windows 64-bit can also be found on Github here: Overmix releases
August 14th, 2016 16:20
Sadly, that there is no 32bit version…
August 30th, 2016 14:28
I do not currently have a setup capable that can compile a 32-bit version, and it would take me several hours (at least) to set it up and I honestly don’t want to.
However I do not see any reason to why anyone would benefit from using a 32-bit OS today. If you can convince me that 32 bit is a necessarily for some people, I will put in on my todo list, but as I see it, people have had 10 years now to upgrade to a 64-bit system and failing to do so is their own fault. (For those who swear to Windows XP, note that Overmix relies on software which have dropped support of XP.)
February 25th, 2017 05:19
It works nicely well for non moving images but can’t seem to get it to work on anime images that have the view moving around.
September 7th, 2018 13:52
Sorry for the late reply, I didn’t notice your comment and it has been in the spam queue all this time.
The aligning method isn’t perfect and might require you to mess with the settings a little. I haven’t spent time improving it as I rarely end up with an image which will not align, but I have been considering to improve it.
If you have difficulties, feel free to ask. If you share the images you are trying to stitch as well I can give some more specific advice. Preferably create an issue on Github: https://github.com/spillerrec/Overmix/issues but if you do not want to create an account on Github you can send me an mail: spillerrec@gmail.com. Or you can just comment here, but seeing as it took me about 1½ years to notice it I don’t recommend it.
There is a bit of information on how to use the program on the wiki, but it is still fairly incomplete: https://github.com/spillerrec/Overmix/wiki
If there is anything specific you would like to know, notify me and I will try to add it.
February 25th, 2017 05:24
You guys should also make Youtube examples of this