G'MIC 3.2.4 - fx_superpixels (problem)

Bonjour,

There is a problem with the ‘fx_superpixels’ command in G’MIC 3.2.4 (Windows and Linux) .
This command works with G’MIC 3.2.3 but not (or very slow) with G’MIC 3.2.4.

For example :

gmic sp colorful tic fx_superpixels 16,10,5,1,1,0,0,0,255,0,50,50 toc

Merci :o)

1 Like

Is it better with

?

@David_Tschumperle

I applied this modification and compiled G’MIC 3.2.4
There is no significant difference between the 2 versions :o(

Merci :o)

The test:

gmic sp colorful resize 200,200 tic fx_superpixels_preview 16,10,5,1,1,0,0,0,255,0,50,50 toc
1 Like

@David_Tschumperle

Bonjour,

I did a few tests and the problem seems to be the new version of CImg.h
The operation is normal and fast with the G’MIC 3.2.3 version modified for G’MIC 3.2.4
I attach the executable ‘gmic.exe’ compiled with this modification for Win 64bit (gmic.7z).

gmic.7z (2.2 MB)

1 Like

Hello @samj ,
I confirm there is a speed issue also for me with this command.
Unfortunately, I have very few time to spend right now trying to find what modification is responsible for the slowness. Would you agree to help ?
I’d be particularly interested by the commit number in CImg or G’MIC code where the problem starts to appear!
Thanks a lot!

Well, I found this one:

It seems that the recent changes in the way the norm() function is implemented in the math parser is responsible for the slowness. Could you confirm?
Still investigating…

@samj, I think I’ve found the issue.
This commit should fix it:

Could you confirm?

@David_Tschumperle

Bonjour,

Thank you very much for taking time to correct this problem.
With ‘commit 70e9a2c’ the ‘fx_superpixels’ command works properly.

Bonne journée :o)

1 Like

Binaries G’MIC 3.2.5_pre230518 for Win 64 are available (CLI, QT, GIMP 2.99.14/15, GIMP 2.10.34):

https://github.com/GreycLab/gmic-community/releases/download/gmic-3.2.5_pre/gmic-3.2.5_pre230518_Win64.7z

42 167 675 bytes

MD5
41a045b47fd5fe874720e719c9c6fc6a

SHA256
de5dce639e52dc5192d7301ba8b69d8b6e5c9459007c8550ccaef4568e50679e

SHA512
f8aa57c68b5eff595e7463c85a417f96f911cbc16d1707432b82466b778db086d866661455cb9c48a15652a35645a8fa94aaf914e5048efa36f16f8a2a6001e9