JPG ghosts and AnaBuilder
Les fantomes JPG et AnaBuilder

& Didier Leboutte

Here is the image used in this tutorial.
Voici l'image utilisée dans ce tutoriel.
Orig.png

1) JPG Ghosts
1) Les fantomes JPG

On an idea of Pierre Meindre (thanks to him) it appears that JPG ghosting is mostly due to standard chrominance sub-sampling in common JPG compression tools. Here is an anaglyph build with 100% JPG quality, in a standard JPG compression configuration. Size : 248K.
Sur une idée de Pierre Meindre (merci à lui) il apparait que les fantômes JPG sont surtout dus au sous-échantillonnage de la chrominance dans les outils courants de compression JPG. Voici un anaglyphe construit avec une qualité JPG de 100%, dans une configuration de compression JPG standard. Taille : 248K.
Pref
100

If you are looking at the red / cyan décomposition, you will see that the red layer contains an impression of the cyan layer on the right of the flower : a JPG ghost on the left eye (even at 100% quality !).
Si vous regardez la décomposition rouge / cyan, vous verrez que la couche rouge contient une impression de la couche cyan sur la droite de la fleur : un fantome JPG dans l'oeil gauche (même à qualité 100% !).
100PA
Here is a gray version (click here) of the red side where the ghosts are perhaps more visible.
Voici une version en gris (cliquez ici) du côté rouge où les fantomes sont peut être plus visibles.

Here is what you are obtaining at quality 50% (click here) 27K, and the corresponding red / cyan decomposition (click here).
Voici ce que vous obtenez à la qualité 50% (cliquez ici) 27K, et la décomposition rouge / cyan correspondante (cliquez ici).

2) AnaBuilder's no ghosting JPG
2) Les JPG d'AnaBuilder sans fantomes

AnaBuilder offers a JPG compression configuration where the chrominance subsampling is set off (see Preferences panel). Here is an anaglyph build with 100% JPG quality, in a the new JPG compression configuration. Size : 397K. Of course larger for 100% quality, but you will be able to compress more without ghosts, see compression comparison below..
AnaBuilder offre une configuration de compression JPG où le sous-échantillonnage de la chrominance a été désactivé (voir le panneau des Preferences). Voici un anaglyphe construit avec une qualité JPG de 100%, dans la nouvelle configuration de compression JPG. Taille : 397K. Bien sur, plus large pour 100% quality, mais vous pourrez compresser plus sans fantome, voir les comparaisons de compressions ci-dessous.
Pref
100NoSub

If you are looking at the red / cyan décomposition, you will see that the red layer no more contains an impression of the cyan layer on the right of the flower : no more JPG ghost on the left eye.
Si vous regardez la décomposition rouge / cyan, vous verrez que la couche rouge ne contient plus une impression de la couche cyan sur la droite de la fleur : plus de fantome JPG dans l'oeil gauche.
100NoSubPA
Here is a gray version (click here) of the red side.
Voici une version en gris (cliquez ici) du côté rouge.

Here are several JPG quality levels, see by yourself when the JPG ghost is back...
Voici plusieurs niveaux de qualité JPG, voyez vous même à quel moment le fantome JPG réapparait...

Only horizontal chrominance sub-sampling removal (larger but better).
Suppression du sous-échantillonnage de la chrominance horizontal seulement (plus gros mais meilleur).
Pref
Anaglyph
Red / Cyan décomposition
100 % 313K
100
98 % 207K
98
95 % 128 K
95
80 % 53 K
80
60 % 35K
60
50 % 31 K
50
40 % 27 K
40
30 % 23 K
30


Full chrominance sub-sampling removal : horizontal and vertical (even larger, but even better).
Suppression complète du sous-échantillonnage de la chrominance : horizontal et vertical (encore plus gros, mais encore meilleur).
Pref
Anaglyph
Red / Cyan décomposition
100 % 438K
100
98 % 266K
98
95 % 159 K
95
80 % 66 K
80
60 % 43K
60
50 % 38 K
50
40 % 34 K
40
30 % 29 K
30

Working on red chrominance channel only, here is an JPG anaglyph of 18K with very low JPG ghosts (regarding to compression rate). On this image, the picture quality is very bad, but the stereo effect is preserved in spite of few JPG ghosts : with this compression technic, at this compression level, it is of course LESS a picture, but it is STILL a stereo...
En ne travaillant que sur la chrominance rouge, voici un anaglyph JPG de 18K avec vraiment très peu de fantomes JPG (au regard du niveau de compression). Sur cette image, la qualité de la photo est vraiment mauvaise, mais l'effet stereo est préservé en dépit de quelques fantomes JPG : avec cette technique de compression, à ce niveau de compression, c'est bien sur MOINS une image, mais c'est ENCORE une stereo...
Pref
18K

3) Known tools to produce good JPG anaglyphs
3) Outils connus pour produire de bons anaglyphes JPG

Free ! AnaBuilder (of course !).
Gratuit ! AnaBuilder (évidemment !).

Free ! TheGimp, version 2 (1x1 1x1 1x1 Chrominance subsampling option).
Gratuit ! TheGimp, version 2 (option 1x1 1x1 1x1 Chrominance subsampling).

Free ! IrfanView, version 3.95 (disable color subsampling option).
Gratuit ! IrfanView, version 3.95 (option disable color subsampling).

Free ! MyAlbum, latest version
Gratuit ! MyAlbum , dernière version

PhotoShop, latest version (high JPG quality tuning only).
PhotoShop, dernière version (ajustement JPG haute qualité seulement).

PaintShop Pro 9 (1x1 1x1 1x1 Chrominance subsampling option).
PaintShop Pro 9 (option 1x1 1x1 1x1 Chrominance subsampling).

SPM now offers an other solution : RGB-JPG. In Masuji tests, it seems better than the Cr tuning, but I made some tests by the past on real images that wasn't so good. I also got some compatibility troubles, but now, certainly all softwares can read them..
SPM offre maintenant une autre solution : les JPG-RVB. Dans les tests  de Masuji, cela semble meilleur que le réglage Cr, mais j'ai fait quelques tests par le passé sur des images reelles qui n'étaient pas si bons. J'ai aussi eu quelques problèmes de compatibilité, mais maintenant, certainement tous les softs savent les lire.