Using Bimp for sharpening.

Ok, so I am using bimp for sharpening now. Here is what the Bimp file looks like.

#BIMP 1.16
#MANIPULATION SET DEFINITION

[USERDEF0]
procedure=plug-in-wavelet-decompose
num_params=6
PARAM0=1
PARAM1=NOT_USED
PARAM2=NOT_USED
PARAM3=3
PARAM4=0
PARAM5=0

[USERDEF1]
procedure=plug-in-unsharp-mask
num_params=6
PARAM0=1
PARAM1=NOT_USED
PARAM2=NOT_USED
PARAM3=1.5
PARAM4=0.25
PARAM5=0

[USERDEF2]
procedure=gimp-image-flatten
num_params=1
PARAM0=NOT_USED

[CHANGEFORMAT]
format=3
quality=100
smoothing=0
entropy=true
progressive=false
comment=
subsampling=2
baseline=true
markers=0
dct=1

Basically I wavelet decompose then unsharp mask with the parameters above. Flatten then save at 100% jpg.

I think though, that my unsharp mask is being applied to all scales of the wavelet.

I am not a coder, but is there a way to incorporate a sharpening protocol by duplicating certain scale layers in the wavelet instead of using unsharp mask and applying that to all scales.

I used this Bimp file above to sharpen the 200+ photos of cheerleaders at a football game found in the gallery below.
(It took my computer 45 minutes to complete this process.)

On the head shots, I sharpened them manually after editing by duplicating scale 1 and 2 in wavelet.

https://254allstars.smugmug.com/2019-College-Football-/102419-UMHB-Cheer/

No replies, maybe no BIMP users around.

Using Gimp 2.10 and the GEGL Unsharp-Mask ? Asking because the scale of parameters is very different between the old unsharp mask and the GEGL version. BIMP is now up to version 2.2 however earlier versions are ok.

The values shown in the BIMP script are small (pre-Gimp 2.10?) and difficult to see any effect.

Wavelet-Decompose: Your BIMP script only produces a single scale layer, manually you get three layers. Scale 1 - Residual - the image

From the way BIMP works Wavelet-Decompose is applied, that then becomes ‘the image’ and Unsharp Mask is applied to that. Not the same as sharpening Scale 1.

What you can do is bundle the two procedures into a single plugin and use that in BIMP. You could expand that to sharpen other scale layers as well.

Edit: I can not get this forum format to properly display the script - so a download from
https://my.pcloud.com/publink/show?code=XZziv8kZGDEztBLc78m0H4PrkDnobLvApgAV

Like you, I am no scripter but this little python script;
(1) Makes a default 5 layer Wavelet-Decompose, without layer group.
(2) Sharpens the top layer, Scale 1, (image.layers[0] in the script.) Edit values to suit.
For other layers, uncomment (the #) and add some parameters.

You can try out your parameters on a single image (Tools menu → testing)
In BIMP that appears as Other GIMP procedure - python-fu-testing - no parameters
Then add save-as-jpeg BIMP procedure - Change format and compression

Thanks for the reply and thanks for that helpful script.

Now how can I take this script and instead of applying unsharp mask, just having the wavelet duplicate the 1st and or 2nd layer for sharpening.

I need to spend more time with this. Only problem is that I am 2500 images deep that need editing.

I do not know about duplicating the scale layers but say you start with just two layers as :

Edit: OK, looked back at your other post and see the duplicate layers method.

2500 images, that is a lot for BIMP You might be better off trying some of the ImageMagick sharpening algorithms.

Snibgo who posts here is the person to advise.

I am a sport photographer, so a good deal of my images are shot at High ISO. >3000. I use Raw Therapee to process the shots from Raw to Jpg. I am trying to keep image noise down as much as possible and I feel the Wavelet sharpening via duplicate scales does that very nicely. (it is one of those risk/reward scenarios) At High ISO, it is a catch 22. Not to mention, in RT, I use Tone mapping and local contrast at very toned down settings which inherently adds grain, but I try to tone that down a little with Lumanance noise reduction. (over time I have have been making micro adjustments to reap the best scenarios)

On the XML file above from BIMP the reason the sharpening variables are so low is because I think it was applying it to each scale of the 3 scales in the wavelet. The end product was way too sharp. (that is when I thought maybe it was applying it to each scale.) This is why I toned down the variables in the unsharp mask.

Duplicating the two top layers of a wavelet-decompose.

Different procedures from before, so a new plugin, testing1.py

https://my.pcloud.com/publink/show?code=XZj3i8kZVj50xcoL64VusFsR5ANL0uTpg6nV

It does work in BIMP add it as Other GIMP procedure python-fu-testing1

Wow, thank you. I was trying to screw around and not having any success. I will play with that and get back to you tomorrow. I really appreciate this. Holy cow.

John

You may also want to try GMIC’s Octave sharpening, which also uses wavelet scales as well.

Using gmic_gimp plugin might be a good choice.

Since the topic is …with BIMP, a little awkward to set up.

Use Gimp to determine some suitable parameters.

Imgur

Gmic can save to a log file in the gmic folder ( just next to your Gimp profile folder).

Might look like this v -99 fx_unsharp_octave 6,5,6,0,0,0,24,0,50,50

Add those to BIMP ‘Other GIMP procedure’ copy/paste into the command string.

Imgur

best of luck

I had an issue a while back for some reason there were two versions of gimp on my computer. I downloaded gmic and it went to the previous version automatically. I do not know why. After an Ubuntu update it rendered that version of gimp useless and that was also the one I had tied to Raw Therapee. I can not get the new gimp to work in conjuction with RT anymore even when I use the correct file tree.

Well, I am using (k)ubuntu 18.04 (bionic) Gimp 2.10.12 from the PPA and that gmic is a 2.8.0 but the regular one works ok.

However, not sure about compatible versions of Gimp and RT. There will be a post soon about the appimage. BIMP and Gmic work fine in that.

Edit: A good guess. Two versions of Gimp, one does not work with RT - New version probably a flatpak or a snap version.

1 Like

There is also the gimp appimage with gmic embedded in it. It works well!

1 Like

I want to thank everyone for help in this thread. Mr Rich, I owe you a steak. Thank you so much for the code. I made a few revisions to it, because I felt the script was a little heavy handed for High ISO sharpening. I took out the s1 portion and it seems to duplicate the s3 layer. (Which is very nice) I now have two scripts one for Low ISO and one for High ISO Wavelet Sharpening. Prior to yesterday, I never installed a from “the ground up script”. Your addition to my workflow will be instrumental.

Can not thank you enough.

1 Like

The image on the left is before the script and the one on the right is after. Take note that this is a 100% crop and the image was taken at 4000 ISO.

1 Like