5 ms·
Arguably downscaling does not fill in missing information, it only throws away information. Still, implementations vary a lot here. There might not be a consens
by planede 4y ago
Arguably downscaling does not fill in missing information, it only throws away information. Still, implementations vary a lot here. There might not be a consensus of a unique correct way to do downscaling, but there are certain things that you certainly don't want to do. Like doing naive linear arithmetic on sRGB color values.
- HPsquared 4y agoInterpolation is still filling in missing information, it's just possible to get a pretty good estimate.
- willis936 4y agoThis is wrong. Interpolation below Nyquist (downsampling) results in a subset of the original Information (capital I information theory information).
- astrange 4y agoImages aren't bandlimited so the conditions don't apply for that. That's why a vector image rendered at 128x128 can look better/sharper than one rendered at 256x256 and scaled down.
- willis936 4y agoThey are band-limited. That's why you get aliasing when taking unfiltered photos above Nyquist without AA filters. In your example the lower res image would be using most of its bandwidth while the higher res image would be using almost none of its bandwidth. Images are 2D discrete signals. Everything you know about 1D DSP applies to them.
- orlp 4y agoOne interesting complication for a lot of photos is that the bandwidth of the green channel is twice as high as the red and blue channels due to the Bayer filter mosaic.
- astrange 4y agoIf some of the edges are infinitely sharp, and you know which ones they are by looking at them, as in my example, then it's using more than all its bandwidth at any resolution.
- willis936 4y agoThat's true in the 1D case as well. That requires upsampling with information generation before downsampling. Using priori to guess missing information is a task that will never be finished and is interesting. It isn't necessary for a satisfactory downsampling result.
- Gordonjcp 4y agoAha, no! Downscaling *into a discrete space by an arbitrary amount* is absolutely filling in missing information. Take the naive case where you downscale a line of four pixels to two pixels - you can simply discard two of them so you go from `0,1,2,3` to `0,2`. It looks okay. But what happens if you want to scale four pixels to three? You could simply throw one away but then things will look wobbly and lumpy. So you need to take your four pixels, and fill in a missing value that lands slap bang between 1 and 2. Worse, you actually need to treat 0 and 3 as missing values too because they will be somewhat affected by spreading them into the middle pixel. So yes, downscaling does have to compute missing values even in your naive linear interpolation!
- im3w1l 4y agoFor downscaling, area averaging is simple and makes a lot of intuitive sense and gives good results. To me it's basically the definition of downscaling. Like yeah, you can try to get clever and preserve the artistic intent or something with something like seamcarving but then I wouldn't call it downscaling anymore.
- meindnoch 4y ago>Take the naive case where you downscale a line of four pixels to two pixels - you can simply discard two of them so you go from `0,1,2,3` to `0,2`. It looks okay. This is already wrong, unless the pixels are band-limited to Nyquist/4. Trivial example where this is not true: 1 0 1 0 If such a signal is decimated by 2 you get 1 1 Which is not correct.
- deleted 4y ago[deleted]