afre's G'MIC diary

Updates

1 Upgrade afre_portraitmontage is now complete. The code is nicer and bug checked. It has resize options (small, large) and more matte shapes (none, circle, polygon, star). To-do Add matte shapes suitable for afre_montagex.

2 Add translation_en.gmic and translate samj_reptile (not much but a start). Didn’t realize this translation method was deprecated.

2 Fix afre_box_fast to make radii<3 fast. Benefits afre_sdpatch and afre_gui*_fast based commands.


Update your G’MICs in a hour or so.

1 Like

This is an example of geodesic morphology. afre_openg 7 will remove the apostrophe ' because its width is less than 7px wide (6px).

afre_openg_7

This is how a regular open (7px) would appear. Looks like a made up sci fi or fantasy language.

regular_open

1 Like

what would be cool is a gif of this…

openg

2 Likes

This time with sample barbara afre_openg 7.

Original

_barbara

Loop of the second part of geodesic opening

openg

1 Like

This is neat! Thank you for having tried!

Yet another “noise suppression” attempt.

JPEG Preview - “Denoised”

Pencils Noise 40 - “Denoised”

pencilsdn2

1 Like

It’s looking good. By the way, remember that you wanted to do multi-threaded evaluation, and then move on into next row/column? One could do that with a image strip, and insert a repeat({w or h or d}, I(#ind,tx,ty,tz)=expression;);.

Yet another “noise suppression” attempt. No machine learning, just mild-mannered fun with afre.

Before (source: Exporting/importing photos in full 32-bit representation (to train a neural network for image denoising) - #85 by Peter)

After (on JPEG above, not raw original)

PS Closeups (using my unreleased auto-crop command)

Before

_bird_denoise_a

After

_bird_denoise_b

1 Like

A bit heavy handed, I think!

There’s some luminosity noise, but the result is good.

Yes, it is more suited for noise texture removal. By texture, I mean noise and soft edges. Combined with Iain’s recovery algorithm, it would be a good denoiser.

2 Likes

Yes! The detail recovery algorithm does best when textures have been removed but edges have been kept.

Here is the bird with the details recovered.

What were the arguments?


With some texture blended back.

I used “guide recovery” with a recovery setting of about 0.8, everything else at default.

This is what it looks like with

+ Iain Noise Reduction 2019 (Guide Recovery 0.8)

The recovery re-introduces some noise. If we compare this with the machine learning (ML) result, it has the following properties:

PSNR
Mine relative to ML 28.362
The larger the better: 30-50 dB is acceptable for lossy JPEG.

MAD (dispersion)
Noisy 45.960 vs ML 7.4129 vs Mine 14.825

STD Noise
Noisy 22.874 vs ML 0.331 vs Mine 4.972
Closer to ML the better. How far can we dial back Guide Recovery without sacrificing detail? @Iain Any other arguments to consider? I get brain fog when there is more than a few :slight_smile:.

3 Likes

Guide reduction only uses that one control. All other controls are not used because that is for the main noise reduction, which is skipped because you are providing a noised reduced image instead.

The detail recovery will introduce some noise because that is the least objectionable artefact I could get.

I might be possible to improve it or provide more control.

There is room for improvement other than adding more control; e.g., post #221 is suspect to stretchmarks that can sometimes arise from deconvolution.


Another example of the latest method (without Iain’s algorithm).

Before (JPG source: Exporting/importing photos in full 32-bit representation (to train a neural network for image denoising) - #49 by KristijanZic)

After texture removal + some texture blended back

After texture removal + some texture blended back + Iain’s recovery algorithm

Small Update

New Added afre_queryprimary, which selects per pixel the channel(s) meeting the min, max, med criterion and sets the rest to 0. This can be for an image with an arbitrary number of channels. There is an option to skip the last channel if it is the alpha or transparency channel.

CLI

afre_queryprimary:
    mode={ 0=min | 1=max | 2=med },_skip_last_channel={ 0 | 1 }

  Query pixel minima, maxima or medians of selected images.

  Default values: 'mode=1' and 'skip_last_channel=0'.

GUI standalone or plugin

image

3 Likes

More “denoise” fun. This one includes Iain’s recovery. These experiments are usually on the fly based on past experience. I should keep better track of what works and what doesn’t. Compared to last time:

Pros
– Closer MAD to noisy original
– Sharper less noisy highlights

Cons
– Noisier shadows

vs noisy original

2 Likes