Page 1 of 1

The most high quality GIF

Posted: Sat Feb 04, 2017 6:44 pm
by walbus
The most high quality GIF

Looking cool :)
http://i.imgur.com/RFN3bc9.gif

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 7:09 am
by Keya
the quality is helped by being based on smooth CGI images, and the quantizer is of good quality, but it's still only 255 colors so it's probably not "the most high quality GIF". I think that category is probably reserved for GIF's that use a design trick: tiling subimages onto the main image, each preceded by their own color table, which allows for a GIF image with more than 256 colors. Not all renderers show them properly, but i find it an interesting trick:
Image

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:03 am
by netmaestro
Yes I remember having a bit of trouble with that one when I was writing my decoder. It's mainly about getting the disposal method right iirc. Interestingly enough though, you can achieve close to that quality with one frame using a neural network to generate the color table.

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:06 am
by Keya
why neural network as opposed to a clustering algo?
[edit] ooh, Neuquant :) ive actually gotten better (slightly - not much room for improvement) results from kmeans++, but Neuquant always a close 2nd for 256 color images, it's very impressive at that level. Neuquant starts to lose ground to a variety of other algorithms though when quantizing to more than 256 colors, at least according to my tests with PSNR, MSE and image quality metrics like SSIM but not a huge sample size

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:13 am
by netmaestro
Mainly because I've experienced better quality with Dekker's NeuQuant than anything else I've tried. Here's a single-frame 256-color gif with the colortable created from a .png screenshot of your posted gif (when the lines and stuff were all gone) The colortable was generated using Wilbert's port of NeuQuant:

Image

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:31 am
by Keya
i cant do a fair comparison with yours because yours is upscaled to 260x260 but the original image is only 210x210 and we might not be using the same upscaling algorithms

Doing a test now. btw original is https://upload.wikimedia.org/wikipedia/ ... olours.png (bit better quality anyway :)

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:37 am
by netmaestro
So sorry about that, my mistake. I made a new one from a png the right size, it's updated. I'd be interested to see/hear the results of comparisons with other algorithms, for sure.

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:40 am
by netmaestro
Saw your edit and created the gif from the png in that link. Posted gif is updated, you should be able to do a fair comparison now.

Re: The most high quality GIF

Posted: Sun Feb 05, 2017 8:49 am
by Keya
my results:

Code: Select all

KMeans++   MSE=2.655404384   RMSE=1.6295411575
KMeans     MSE=4.1429251701  RMSE=2.0354176893
Neuquant   MSE=6.294452003   RMSE=2.5088746487
Octree     MSE=7.8999017385  RMSE=2.8106763845
for kmeans++ see JHP²'s OpenCV-for-PB :) http://www.purebasic.fr/english/viewtop ... 12&t=57457
use #KMEANS_PP_CENTERS to ensure it uses the kmeans++ initializer (starts with better centroids), otherwise it's just kmeans. Ive got a lot of quantizers in my toolkit now but i think only Neuquant uses neural network, interesting and fairly effective approach