Why EWA/circular scaling operators?

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: Why EWA/circular scaling operators?

Post by NicolasRobidoux »

Personal resolution: I will not comment anymore in this thread.
-----
Last comment:
Spectral considerations alone are not enough in the context of (let's keep things simple) resizing when dealing with the HVS.
For a number of reasons, an important one being that text and text-like image features (many buildings have perfectly straight walls, with sharp corners, for example) are really important to most human beings.
-----
Actually, one more:
At great cost to my mother, I had two high quality models of the HVS implanted into my head.
I'll do my best to get the most out of them before the warranty runs out.

hjulenissen
Posts: 18
Joined: 2012-10-05T03:44:29-07:00
Authentication code: 67789

Re: Why EWA/circular scaling operators?

Post by hjulenissen »

NicolasRobidoux wrote:
hjulenissen wrote:...
I have not pondered much about the general, complex distorted case. Would it be possible to assume "local uniformity" over a suitable neighbourhood of pixels, calculate a local spatial cutoff frequency (either rotationally symmetric or tensor), and design a local kernel tailored for the local conditions?
I was not talking about warping. The matrix involved in, say, enlarging an image from 10x10 to 11x11 is not the same as the matrix involved enlarging the same image to 12x12, or enlarging a 9x9 to 11x11.
If the "function to be sampled" is allowed to be hairy, then it may contain an infinite amount of information, and any number of discretely sampled arrays may be obtained from it.

The question is perhaps if it is reasonable to expect this function to be "smooth", or if it is reasonable to expect the array resampling 1000x1000 -> 1001x1001 to be very different from the array resampling 1001x1001 -> 1002x1002. I think that smoothness is reasonable (ie a continous function that may be described by a "quite" limited order polynome, sin/cos pairs or whatever).

-h

User avatar
anthony
Posts: 8884
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Why EWA/circular scaling operators?

Post by anthony »

Note that while the filter function used may be the same for a 1000 -> 1001 resize as for a 1000 -> 1002 resize,
the actual samples or weights generated by the function will vary. That is because the actual distance of actual source pixels (weighted values) from the sample point (reversed mapped from the destination image) will have changed, for every pixel in the destination image.

That is true for both upsampling or downsampling. However downsampling has a scaling factor, while upsampling has that scale factor 'pegged' to 1.0 as a limit.

In the case of a triangle filter, upsampling will (due to this 'pegging' or scaling limit) will make it equivelent to a bilinear interpolation (at least for a 2-pass tensor resize, not for a cylindrical distort resize). It is however different for downsampling as the triangle will become scaled.

However as you pointed out at the start, every method is really just a approximation of a total source image weighting matrix to each pixel, something that is really far to large to truly consider. Also as Nicholas pointed out, what is to say that a linear weighting method is ideal. When colorspaces become involved and even every individual's eyesight is different, not to mention individual's tastes, and 'desired characteristics' in the result, really there is no such thing as 'ideal'. It is a myth.

All we can do is approximate and provide different methods to allow people to choose from if they are that picky about there personal 'ideal'.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: Why EWA/circular scaling operators?

Post by NicolasRobidoux »

hjulenissen wrote:...
There is a BBC whitepaper that suggests that image resolution can be somewhat reduced if the reconstruction filter is "sharp". I.e. applying sharpening after upsampling an image, you can perceptually achieve the same thing as actually having somewhat higher resolution. This may not surprise you guys, but it is nice to have a properly conducted test-panel conclude this in a "blind" test.
Would you be kind enough to provide a reference? I'd love to read it.

hjulenissen
Posts: 18
Joined: 2012-10-05T03:44:29-07:00
Authentication code: 67789

Re: Why EWA/circular scaling operators?

Post by hjulenissen »

NicolasRobidoux wrote:
hjulenissen wrote:...
There is a BBC whitepaper that suggests that image resolution can be somewhat reduced if the reconstruction filter is "sharp". I.e. applying sharpening after upsampling an image, you can perceptually achieve the same thing as actually having somewhat higher resolution. This may not surprise you guys, but it is nice to have a properly conducted test-panel conclude this in a "blind" test.
Would you be kind enough to provide a reference? I'd love to read it.
http://downloads.bbc.co.uk/rd/pubs/whp/ ... WHP092.pdf

regards
-h

hjulenissen
Posts: 18
Joined: 2012-10-05T03:44:29-07:00
Authentication code: 67789

Re: Why EWA/circular scaling operators?

Post by hjulenissen »

anthony wrote:Note that while the filter function used may be the same for a 1000 -> 1001 resize as for a 1000 -> 1002 resize,
the actual samples or weights generated by the function will vary. That is because the actual distance of actual source pixels (weighted values) from the sample point (reversed mapped from the destination image) will have changed, for every pixel in the destination image.
I think that the dsp-textbooks explains resampling quite well: for resampling by factors U/D, where U and D are integers, one can see the process as regular insertion of zeros and dropping samples, with a simple lowpass-filter in-between. The filter may be sampled by some continous function or designed directly, but it has to operate on a (potentially very high) intermediate rate. In practice, most of the multiplications will be carried out on 0 samples or generating outputs that will not be used. That is very inefficient, and the practical implementation will tend to be a polyphase approach where only relevant mult/adds are performed using a time-variant (space-variant) filter.

x(n)-->[zero-insert]-->[LPF]-->[sample-drop]-->x'(m)

Audio dsp tends to put much weight on frequency-domain considerations, while image processing tends to put more weight on (non-transformed) spatial-domain considerations. I have talked about the manner in which the block labelled "LPF" in my flow-graph is calculated. It seems that IM, like most others, sample a smooth continous waveform at the appropriate sample points.

Am I missing something?

-h

NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: Why EWA/circular scaling operators?

Post by NicolasRobidoux »

Interesting.
Thank you.

Locked