Using -blend_fade

Happy New Year! This is my first time using G’MIC and posting here (feel free to change the title or add new tags). I would like to sharpen an image but take it a down a notch by blending the sharpened image with the original, with less emphasis on the highlights. E.g.:

gmic.exe 9974.jpg --gimp_smooth_anisotropic[0] 3,0.16,0.63,0.6,2.35,0.8,30,2,0,1,1,0,1 -samj_Wavelet_Sharpen_Test[1] 2 --luminance[0] -apply_curve[2] 1,0,255,255,0 --blend_fade[0,1] [2] -o result.jpg

[Oops, I can’t post any images yet!]
result_000000.jpg
result_000001.jpg
result_000002.jpg
result_000003.jpg


I was expecting result_000003.jpg to look more like this (masked and blended in GIMP):

result_expected.jpg


PS To clarify, since I am unable to post the images yet, result_000003.jpg looks identical to result_000001.jpg

I guess you are going to have to interact enough with the site a bit to be able to post your images. Have a browse and toss in your input.

The blending shape image should have values in [0,1], so adding -normalize[2] 0,1 before invoking -blend_fade should help !

1 Like

Thanks. I did this at one point but forgot to update the preview. Navigating data ranges can be daunting :confused:.

One more question about blending. I was wondering if there is a simpler way to recompose the image after -fx_split_details_wavelets than blending two layers at a time. Blend [standard] (-fx_blend) looks like something that could do it, but I don’t know how to get it to work.

Two different methods:

  • If you use the plug-in command -fx_split_details_wavelets, then you can recompose your images at once using -gui_merge_layers, like this :

      $ gmic -sp lena -fx_split_details_wavelets 6,0,0 -do_what_you_want_here --gui_merge_layers
    
  • If you use directly the CLI command -split_details, then just add the image together to reconstruct the original image:

      $ gmic -sp lena -split_details 6 -do_what_you_want_here --+
    

The difference between the two is that -fx_split_details_wavelets is focused on the use in a host software (e.g. GIMP), so it takes care on the value range of decomposed images (renormalized in [0,255] for instance), and also adds image names to allow correct blending modes applied on output layers.
The second one is more suited to be used in a CLI pipeline (and is a bit faster probably).

1 Like