When you get Moiré from the sensor of a camera or scanner, then there is nothing much you can do.<p>But extreme Moiré effect from resizing is not really Moiré. It's aliasing. And it typically happens because the resizing happens in a non-linear colorspace and/or with a poor kernel. Unfortunately this mistake is quite common in many image processing software.
I obtained a similar effect with The Gimp and the wavelet decomposition plugin[1] that splits the picture in various layers containing details at different granularity. You can then simply remove the "bad" ones. On portraits, you can remove freckles and wrinkles very easily this way, too.<p>[1]: <a href="https://docs.gimp.org/2.10/en/plug-in-wavelet-decompose.html" rel="nofollow">https://docs.gimp.org/2.10/en/plug-in-wavelet-decompose.html</a><p>So I tried it on his image and here's how it looks with default settings:<p><a href="https://demo.intellique.org/nextcloud/index.php/s/SsgWGczo6GMe5yx/download/decomposed.jpg" rel="nofollow">https://demo.intellique.org/nextcloud/index.php/s/SsgWGczo6G...</a><p>Much less work :)
Done since the mid-1960's :) but, nevertheless, always an interesting read!<p>This is <i>classical</i> (as in pre-GPU AI/ML) Image Processing. The reference text book in the field, "Digital Image Processing" by Gonzalez et al, shows how to do it: like the pioneers at JPL's Image Processing Laboratory (est. 1965) denoised Mars pictures from the Mariner probes using Frequency Domain methods like the posted article uses - see an example below.<p>[<a href="https://pixelcraft.photo.blog/2021/09/29/the-early-days-of-image-processing-to-mars-and-beyond/" rel="nofollow">https://pixelcraft.photo.blog/2021/09/29/the-early-days-of-i...</a>]
I wonder what would be the more systematic approach than manually painting over the fft image? That constellation of peaks in fft should be reasonably easy to recognize (semi-)automatically, then you'd need to figure out good mask for those.. is it a circular blob, or maybe diamond/star shape? And what size is best? Etc etc.
> All the demoireing guides tell you to apply a sharpening filter after this to compensate, but that’s like reheating cold pizza. You will never get back to where you were before, no matter how hard you try<p>Actually the noise from the moire can fake detail that wasn't there in the first place. Put film grain or a raster on top of a blurry image and it will subjectively improve in quality.
<i>"This is why nobody will allow you to wear stripes on television:"</i><p>This used to be cardinal rule in television broadcasting but it's much less a problem nowadays with the increased resolution/line rate of HD TV and video processing (filters) designed to eliminate it.<p>Nevertheless, whilst once discouraged, moiré was often a useful tool as camera and CCU (Camera Control Unit) operators would use it to focus an image—the more pronounced the moiré the sharper the camera's focus.<p>As bad as moiré is perceived a much greater cardinal 'sin' in both television broadcasting and photography is <i>lateral inversion.</i> This is where the image has been swapped in the horizontal direction (in some places it was a dismissible offence), as it's a complete distortion/misrepresentation of the image, which in some instances, may go undiscovered—there being no visual clues to indicate the problem.<p>Lateral inversion is very obvious when writing, street signs etc., appear backwards but for some reason it's very much less so when images of humans are involved. Despite the fact that laterally-inverted images put men's clothes on women and vice versa—as blouses, shitrts, coats and pants flies appear the wrong way around—few people seem to notice.<p>There's much evidence for this, one I often cite is that there are images from WWII on the US National Archive by the US Army Signal Corps that are still laterally inverted after 70-plus years that no one has bothered to correct (it's not a recent scanning error either as the Signal Corps logo (which is embedded within the photo) is not laterally inverted but the image content is).<p>BTW, laterally inverting a film image reduces the resolution as the negative or slide is no longer in the normal focus plane.
> occurring when two similar frequencies overlap and create strange, pulsating patterns<p>I just made the connection between moire and beats. Nice!<p><a href="https://en.wikipedia.org/wiki/Beat_(acoustics)" rel="nofollow">https://en.wikipedia.org/wiki/Beat_(acoustics)</a>
Here's my favorite "alternative" explanation of moiré:<p>sin(a) * sin(b) = 0.5 * (cos(a - b) - cos(a + b))<p>You may remember this formula from high school. The arguments a and b are basically frequencies. When you multiply two frequencies a and b, you will get their difference cos(a - b) and their sum cos(a + b). If two frequencies are similar (e.g. 101Hz and 100Hz) you get one very low frequency (101Hz - 100Hz = 1Hz) and the other one will be much higher number (101Hz + 100Hz = 201Hz). It's hard to see that higher frequency 201Hz, you have to come really close, but it is easy to see that low frequency, that 1Hz would manifest as 1 dark blob across entire area.
Hang on then, if you're just notching out certain frequencies by painting over them in a 2D FFT could you do the same thing by treating the image like it was raster-scanned video and passing it through a notch filter at the Moiré frequency, or for that matter a comb filter? After all that's how you remove PAL subcarrier speckle from composite video.
A certain YouTube creator wears striped shirts on camera a lot, but I feel like he should probably know better. I wonder if it’s an intentional, subtle troll?