Live data from Hacker News

Moiré no more (2021)

newsletter.shifthappens.site

21–30 of 34 posts

Re: Moiré no more (2021)

#21
Done since the mid-1960's :) but, nevertheless, always an interesting read!

This is classical (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.

[https://pixelcraft.photo.blog/2021/09/29/the-early-days-of-i...]

Re: Moiré no more (2021)

#22
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.

Re: Moiré no more (2021)

#23

Done since the mid-1960's :) but, nevertheless, always an interesting read! This is classical (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…

Speaking of which, with the advent of AI/ML methods, how are Image Processing and Machine Vision courses taught today at Universities?

- Has Python or other free languages replaced Matlab yet?

- Is Gonzales' course structure still followed somehow?

Re: Moiré no more (2021)

#26
post #20
post #8

When you get Moiré from the sensor of a camera or scanner, then there is nothing much you can do. 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.

Aliasing IS a type of Moiré. Take an image, and impose it on a grid of dots - and you get the same afect as from naive resampling.

Technically it's not, but your description is, because of the words "grid of dots", which means there's white space between the dots (as dots are circular), a necessary requirement for the Moiré effect. We see this in image sensors as well, where all photosites have a tiny amount of space between them.

Image resizing isn't a grid of dots, though. At the data level, pixels don't have space between each pixel to cause Moiré effects. Instead, interpolation of the colors leads to patterns similar to, but distinct from, the Moiré effect.

The Moiré effect is "not really there" in that it's a perceptual effect: you can reproduce it with an SVG with the same dot pattern on two layers, and transforming one of them a little. A human observer will "see" patterns that aren't actually there, and as you zoom in the effect disappears (if you're now thinking "because it's on a monitor!", then no: it's not. The same is true for two physical transparencies with the same dot pattern placed slightly shifted on an old school projector, and then changing the zoom on the projector)

Antialiasing is a data property: it can result from lossy interpolating of pixels to a new grid, and is there no matter how much you zoom in because zooming in on a pixel doesn't change its color.

The confusion comes from talking about Moiré patterns on grid based displays. Those will "lock in" or even intensify the effect, but they don't cause the effect.

Re: Moiré no more (2021)

#27
post #8

When you get Moiré from the sensor of a camera or scanner, then there is nothing much you can do. 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.

There's not much you can do to fix it in software, but you can fix it in the optics. You can add a Moiré filter to the camera, which is an optical low-pass filter, ensuring that the image that reaches the sensor does not have any spatial-frequency components above the Nyquist frequency of the sensor (ie, twice the pixel pitch).

Re: Moiré no more (2021)

#28

Past discussion: https://news.ycombinator.com/item?id=28663719 Relevant xkcd: https://xkcd.com/1814/

Thanks! Macroexpanded:

Moiré No More - https://news.ycombinator.com/item?id=28663719 - Sept 2021 (112 comments)

Moiré no more (How to de-moiré a halftoned photo) - https://news.ycombinator.com/item?id=28394884 - Sept 2021 (2 comments)

Re: Moiré no more (2021)

#29

Past discussion: https://news.ycombinator.com/item?id=28663719 Relevant xkcd: https://xkcd.com/1814/

Ah, thanks. I did search before submitting but nothing came up at the time (must have been my connection).

Reposts are fine after a year or so! This is in the FAQ: https://news.ycombinator.com/newsfaq.html.

Re: Moiré no more (2021)

#30

Done since the mid-1960's :) but, nevertheless, always an interesting read! This is classical (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…

It's so classical, it can be done without a digital computer at all, using fourier optics! The true fastest fourier transform, done at the speed of light.

https://en.wikipedia.org/wiki/Fourier_optics

At the focal plane of a lens, an image is converted into its spatial fourier components. By adding blocking elements at that focal plane (eg. an aperture, or a piece of glass with marker dots), unwanted frequency components can be cut out from the image.

Post reply on HN