Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14649
| From | Jan Burse <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Bicubic interpolation suddenly is no better than bilinear. |
| Date | 2012-05-19 20:48 +0200 |
| Organization | albasani.net |
| Message-ID | <jp8pt1$87p$1@news.albasani.net> (permalink) |
| References | <d389e99e-2fc7-40dd-b07d-90140db4f380@w19g2000yqb.googlegroups.com> <nospam-B8112C.07265719052012@news.aioe.org> <fcd6a322-426d-40c7-af97-f4bd62addd5e@h10g2000pbi.googlegroups.com> <9d143d01-dcf4-4343-9477-3ffbcd3027e1@ra8g2000pbc.googlegroups.com> |
Dangling Pointer schrieb:
> Still, something is wrong. Iterative BILINEAR rescaling is*supposed*
> to achieve comparable quality to SCALE_AREA_AVERAGING, and bicubic is
Most probably your claim is wrong, even with the best
rounding in the world. We have ideally:
x1 + .... + x2n x1 + x2 x2n-1 + x2n
--------------- = ------- -----------
2^n 2 2
....
-------------------
2
Now a rounding function r(x/n) can be viewed as
an nummerator correction c(x/n) function:
r(x/n) = (x + c(x/n)) / n
For /2 the nummerator correction is either -1 or 0
when you round down. So there might be a maximal
correction of -1 * 2^(n-1) in the first iteration of
bilinear. Then -1 * 2 * 2^(n-2) in the next iteration,
and so on: Total maximal correction:
-n*2^(n-1)
For /2^n the numeration correction is somewhere
between -2^n+1 and 0 when you round down. So maximal
correction is:
-2^n+1
When is the iteration correction by 2^n bigger
than the area correction? Lets make a little table:
n -n*2^(n-1) -2^n+1 diff 2^n
1 -1 -1 0 2
2 -4 -3 1 4
3 -12 -7 5 8
4 -32 -15 17 16
5 -80 -31 49 32
6 -192 -63 129 64
7 -448 -127 321 128
So I guess for 4 iteration we could eventually
construct an example where the error would be
at least one color value step, since the
maximal numerator correction difference is
then greater than the denumerator 2^n.
Let's give it a try:
Iterative:
3 0 1 0 0 1 0 3
1 0 0 1
0 0
0
Area:
3 0 1 0 0 1 0 3
1
Yes we have found an example where iterative is
different from area by one color pixel value step.
Bye
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bicubic interpolation suddenly is no better than bilinear. Dangling Pointer <dpointer2@gmail.com> - 2012-05-18 22:58 -0700
Re: Bicubic interpolation suddenly is no better than bilinear. Roedy Green <see_website@mindprod.com.invalid> - 2012-05-18 23:12 -0700
Re: Bicubic interpolation suddenly is no better than bilinear. Roedy Green <see_website@mindprod.com.invalid> - 2012-05-20 22:23 -0700
Re: Bicubic interpolation suddenly is no better than bilinear. "John B. Matthews" <nospam@nospam.invalid> - 2012-05-19 07:26 -0400
Re: Bicubic interpolation suddenly is no better than bilinear. Dangling Pointer <dpointer2@gmail.com> - 2012-05-19 08:07 -0700
Re: Bicubic interpolation suddenly is no better than bilinear. Dangling Pointer <dpointer2@gmail.com> - 2012-05-19 09:13 -0700
Re: Bicubic interpolation suddenly is no better than bilinear. Jan Burse <janburse@fastmail.fm> - 2012-05-19 20:48 +0200
Re: Bicubic interpolation suddenly is no better than bilinear. "John B. Matthews" <nospam@nospam.invalid> - 2012-05-20 09:02 -0400
Re: Bicubic interpolation suddenly is no better than bilinear. BGB <cr88192@hotmail.com> - 2012-05-20 11:59 -0500
csiph-web