Stabilizing stylized images from video using gmic ?

gmic
(Janolap1) #1

Hi,

I’m using gmic stylize effect to transform images (extracted from video) to a custom style, using the command :
gmic input.png style.png +fx_stylize 1,4,0,0,0.5,2,3,0.5,0.1,1 ,5,0,0.7,1,0,1,0,5,5,7,1,30,1000,2,1.85,0 -output result.png

and for those who are interested under DOS :
forfiles /p C:\Users\XYZ\Desktop\ppa\video\extract /m output_???.png /c “cmd /c C:\Users\XYZ\Desktop\ppa\video\gmic\gmic.exe @path C:\Users\XYZ\Desktop\ppa\video\modele\15.jpg +fx_stylize 1,4,0,0,0.5,2,3,0.5,0.1,1,5,0,0.7,1,0,1,0,5,5,7,1,30,1000,2,1.85,0 k[2] -output 02_@fname.png

I would like to have a more fluide rendering : with these settings, if I transform the same image several times, I get different images as results. As if the “calculation” was done with a random seed each time.
With a sequence of images, the result is not really fluid, as if the images are shaking (i don’t know how to explain).

You can see a result in video here :
https://youtu.be/wZtijD6-hm8
(the beginning is the original footage and the end the stylized video)

I would like that the leaves don’t dance like this…

Any ideas ?

Janolap1

(G'MIC staff) #3

Something to test : reset the random number generator with the same seed, before applying the style transfert effect, with something as srand 0.

(Janolap1) #4

@David_Tschumperle

Thank you, I have tried this option, but with the same source and the same style, 2 generated images are differents.

The command line used is :
gmic.exe output_0009.png modele\11.jpg srand 0 +fx_stylize 1,4,0,0,0.5,2,3,0.5,0.1,1,5,0,0.7,1,0,1,0,5,5,7,1,30,1000,2,1.85,0 k[2] -output result01.png
and
gmic.exe output_0009.png modele\11.jpg srand 0 +fx_stylize 1,4,0,0,0.5,2,3,0.5,0.1,1,5,0,0.7,1,0,1,0,5,5,7,1,30,1000,2,1.85,0 k[2] -output result02.png

May be a parameter in the fx_stylize option change an other random parameter…

Jean