From: John Sheehy on
"acl" <achilleaslazarides(a)yahoo.co.uk> wrote in
news:1174265044.633417.250760(a)y80g2000hsf.googlegroups.com:

> If I take 4x4 blocks and replace all 4 spins by the average of the
> original 4 spins (but do not coarse grain them into 1 pixel, but
> instead leave them as 4 separate but identical pixels),

Sounds like PS' "Pixelate|Mosaic".

> is this a
> blurring operation or not? If I next take these 4 (now identical)
> pixels and create one with the same value, is the combined operation
> what is meant by binning or not?

That's sort of like binning, but by averaging instead of adding, you are
working with less precision. Pure binning does not lose anything to
rounding errors. IOW, If you bin 40, 40, 40, and 41, you get 161, which is
equivalent to 40.25 in the original scale, but it would be either 40 or 41
in your method, which is less accurate.

> Compare the above to "nearest neighbour" interpolation, which is to
> take one of the 4 pixels and discard the others (thus no blurring
> before downsampling, if you prefer this way of looking at it)

Nearest neighbor increases noise at the pixel level with an RGB image,
because the low-frequency noise becomes high-frequency. The Nearest
neighbor output is full of strong noise at the nyquist, compared to a
downsampled or binned output.

--

<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
John P Sheehy <JPS(a)no.komm>
><<> <>>< <>>< ><<> <>>< ><<> ><<> <>><
From: acl on
On Mar 19, 3:59 am, "David J. Littleboy" <davi...(a)gol.com> wrote:
> "acl" <achilleaslazari...(a)yahoo.co.uk> wrote:
> > "David J. Littleboy" <davi...(a)gol.com> wrote:
> >> "John Sheehy" <J...(a)no.komm> wrote:
>
> >> > Well, downsampling and binning are a bit different. A downsampling
> >> > should
> >> > use a filter to remove frequencies that complicate and artifact the
> >> > output.
> >> > Binning is just a box effect, with the contents literally added
> >> > together.
>
> >> Binning will result in gross aliasing effects, which are very nasty with
> >> a
> >> Bayer sensor. So it's probably not useful in real life.
>
> >> Noise reduction (via a Gaussian blur) followed by downsampling wouldn't
> >> have
> >> that problem.
>
> > If I take 4x4 blocks and replace all 4 pixels by the average of the
> > original 4 pixels (but do not coarse grain them into 1 pixel, but
> > instead leave them as 4 separate but identical pixels), is this a
> > blurring operation or not? If I next take these 4 (now identical)
> > pixels and create one with the same value, is the combined operation
> > what is meant by binning or not?
>
> Yes. Binning (presumably) averages four (or some other number) of pixels
> with no information from any other pixels. This doesn't work very well as a
> low-pass filter, and allows aliasing artifacts to occur.

Yes, at the cost of lowering resolution. No free lunch! While more
pixels allow a weaker AA filter, downsampling to improve S/N would
force us to blur them (using software) to a similar extend as the AA
filter would for larger pixels. Good point.

>
> Applying a (well-designed) blur at every pixel at the higher resolution and
> then downampling will produce an image with much lower levels of aliasing
> artifacts.
>
> > Compare the above to "nearest neighbour" interpolation, which is to
> > take one of the 4 pixels and discard the others (thus no blurring
> > before downsampling, if you prefer this way of looking at it)
>
> That's decimation. And is, of course, even worse than averaging, since it
> approximates point sampling.

That was the point. I didn't know the terminology was used in signal
processing, if that's where you know it from (I know it from
elsewhere). I am painfully aware of what it can do to you (much worse
than false high-frequency detail, it can completely mislead and give
an explicitly wrong answer in some situations).

From: acl on
On Mar 19, 4:10 am, John Sheehy <J...(a)no.komm> wrote:
> "acl" <achilleaslazari...(a)yahoo.co.uk> wrote innews:1174265044.633417.250760(a)y80g2000hsf.googlegroups.com:
>
> > If I take 4x4 blocks and replace all 4 spins by the average of the
> > original 4 spins (but do not coarse grain them into 1 pixel, but
> > instead leave them as 4 separate but identical pixels),
>
> Sounds like PS' "Pixelate|Mosaic".
>
> > is this a
> > blurring operation or not? If I next take these 4 (now identical)
> > pixels and create one with the same value, is the combined operation
> > what is meant by binning or not?
>
> That's sort of like binning, but by averaging instead of adding, you are
> working with less precision. Pure binning does not lose anything to
> rounding errors. IOW, If you bin 40, 40, 40, and 41, you get 161, which is
> equivalent to 40.25 in the original scale, but it would be either 40 or 41
> in your method, which is less accurate.

it was a thought experiment; my thoughts are infinitely precise :). so
multiplying my result by 4 would give the same as if i did not average

>
> > Compare the above to "nearest neighbour" interpolation, which is to
> > take one of the 4 pixels and discard the others (thus no blurring
> > before downsampling, if you prefer this way of looking at it)
>
> Nearest neighbor increases noise at the pixel level with an RGB image,
> because the low-frequency noise becomes high-frequency. The Nearest
> neighbor output is full of strong noise at the nyquist, compared to a
> downsampled or binned output.

there are also other reasons, not just that the noise is moved up in
frequency space

From: acl on
On Mar 19, 4:28 am, "acl" <achilleaslazari...(a)yahoo.co.uk> wrote:
> On Mar 19, 4:10 am, John Sheehy <J...(a)no.komm> wrote:
>
>
>
> > "acl" <achilleaslazari...(a)yahoo.co.uk> wrote innews:1174265044.633417.250760(a)y80g2000hsf.googlegroups.com:
>
> > > If I take 4x4 blocks and replace all 4 spins by the average of the
> > > original 4 spins (but do not coarse grain them into 1 pixel, but
> > > instead leave them as 4 separate but identical pixels),
>
> > Sounds like PS' "Pixelate|Mosaic".
>
> > > is this a
> > > blurring operation or not? If I next take these 4 (now identical)
> > > pixels and create one with the same value, is the combined operation
> > > what is meant by binning or not?
>
> > That's sort of like binning, but by averaging instead of adding, you are
> > working with less precision. Pure binning does not lose anything to
> > rounding errors. IOW, If you bin 40, 40, 40, and 41, you get 161, which is
> > equivalent to 40.25 in the original scale, but it would be either 40 or 41
> > in your method, which is less accurate.
>
> it was a thought experiment; my thoughts are infinitely precise :). so
> multiplying my result by 4 would give the same as if i did not average
>
>
>
> > > Compare the above to "nearest neighbour" interpolation, which is to
> > > take one of the 4 pixels and discard the others (thus no blurring
> > > before downsampling, if you prefer this way of looking at it)
>
> > Nearest neighbor increases noise at the pixel level with an RGB image,
> > because the low-frequency noise becomes high-frequency. The Nearest
> > neighbor output is full of strong noise at the nyquist, compared to a
> > downsampled or binned output.
>
> there are also other reasons, not just that the noise is moved up in

down not up

From: Roger N. Clark (change username to rnclark) on

Hey Scott,
Where is your test with the picket fence? As I recall,
all attempts to downsample without artifacts pretty much failed.
Quite interesting.

Roger