CFA is sometimes orientated at 135°, sometimes at 45° so until we find if there is a law depending on the screen size, e-reader model or something, the best we can do is attenuate high frequencies on those two directions
It was a mistake to add the perpendicular angles in the previous commit: I had the rainbow effect removal process called 2 times when I did this, for testing purposes (One before downscale and one after downscale).
The proper way to call the process is only after the downscale. And in this case it is not necessary to remove frequencies along the perpendicular angles.
In the mean time, attenuation_factor=0.15 has proven to work well along a collection of testing images.
It should be my latest commit for this feature
The finer settings allow for more information to be retained in the final image, while still effectively removing the rainbow effect.
Adding the perpendicular direction results in a better rendering of the final image (avoiding visual artifacts related to suppression at the main angle).
This helper file contains the methods necessary to perform a fourier transform on the picture, to remove frequencies responsible for rainbow artifacts on Kaleido screens, and performe the reverse fourier transform