Idea for filter "circular chromatic abberations"

Hello,
I have this idea for an improvement of the existing filter “Chromatic Abberations”. My personal problem with this filter is, it just shifts the color channels which looks pretty unnatural (don’t scrap this, there are some use cases for this).
But on photographs chromatic abberations are more circular and get stronger towards the edges of the image. I recently found a post in the KDE-Forums from a person who had the same problem with this filter and actually wrote a new one for G’MIC but the code seems to don’t work (anymore?).

https://forum.kde.org/viewtopic.php?f=274&t=156050#

Unfortunately programming/coding really isn’t my cup of tea, it would be great if someone could take a look at this or improve this even more. I really would like to see this in G’MIC.

Thank You!

Doing a locally adapted shift depending whether the pixel is located on a contour or not seems totally feasible to me.
I’ve a bit of free time this afternoon, I’ll give a try !

PS : And welcome to the forum @Drayventhal :wink:

2 Likes

It took me a few hours, but I think the result is worth the effort :slight_smile:

I’ve completely recoded the filter Colors / Chromatic Aberrations from scratch, to allow more rendering options, for both primary/secondary colors aberrations:

  • Added controls to choose between different types of aberrations/deformations : Shift, Radial, Angular and Random.
  • Added controls to set the amplitude of the color deformation with respect to the distance to the image center or borders. So the color aberration can be more strong on the center, or on the image borders. This was a request from the thread you mentionned.
  • Added controls to set the Smoothness of the color deformation field (useful mainly when ‘Deformation Type’ is set to Random).

Here is how the filter looks right now:

No more ideas of improvements right now, so I let it as it is.
Let me know if you find these new controls useful!

Thanks for the suggestion.

4 Likes

The “radial” option is exactly what I was looking for. It produces great results in combination with Depth-of-Field Blur by the way.

The other options are interesting and very useful for experimenting with other degradiations. Maybe someone else has some more ideas for improvements. I’m very happy with this filter now. :blush:

Since chromatic abberations, glitch-effects and other stuff like this are very popular (probably a bit overused) for diffrent purposes I was actually wondering why nobody asked for this before.
Thank you so much!

1 Like

I guess I found a bug. It seems to happen when choosing “random” for deformation type and a negative value for X-Amplitude.

@Drayventhal There is also Glass Vignette which does chromatic abberation, but serves a different purpose to what @David_Tschumperle did with Chromatic Abberation.

See here for example of Glass Vignette.

image

1 Like

That’s really cool. Looks like it simulates a lens. Of course there is much less control over the chromatic abberations but this could be very useful for fisheye effects.

1 Like

Thanks for reporting. Should be fixed now.

1 Like