Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal,... gamma?

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: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T12:48:45-07:00

@Anthony:
I'd like to add one more image (besides some variant of the above three, which show sigmoidization w/ contrast 7.5, linear light, and direct sRGB enlargement of your "aliased almost vertical line"):
Image
It is a downsample of your small rings image down to 131x131, which both gives an idea of the blurriness, and an idea of the moire suppression.
I know this image is a bit big: 385K.
But I personally find it really informative. For example, note how EWA Robidoux, which is just a nudge sharper than Mitchell, is actually better at moire suppression. (Sorry for the boast, but it stares one in the face right there.) And this is all computed with an HDRI version: With Q16, and even more with Q8, EWA Robidoux would knock the socks off Mitchell.
Last edited by NicolasRobidoux on 2012-09-28T13:28:13-07:00, edited 2 times in total.

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by fmw42 » 2012-09-28T12:54:23-07:00

the two quadratics are quite remarkable in removing/avoiding moire!

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T13:07:14-07:00

@Fred: I've always liked quadratic B-splines. I never could figure out why they are not more popular.
I think it's because Carl de Boor et al wrote a collection of killer articles, and a killer book, putting cubic B-splines in the spotlight, very early on.
Quadratic B-splines did not have such a champion.
Maybe also because they are slightly trickier to program, because their extent goes to a half integer, instead of an integer.
-----
P.S.The way I use them, however, they ARE blurry.
Last edited by NicolasRobidoux on 2012-09-28T13:17:53-07:00, edited 1 time in total.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T13:12:21-07:00

@Anthony:
One way to make my images smaller would be to produce 8-bit versions. I can get on that. I don't think it would mess things up.

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by fmw42 » 2012-09-28T14:14:31-07:00

The splines look good also. Are they as blurry?

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T16:08:07-07:00

@Fred:
Splines are blurrier.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T16:28:01-07:00

@Fred:
I realize now that what my image does not convey clearly is that some of the less moire-prone schemes also lose detail.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T16:48:19-07:00

Maybe this is better (and it's only 207K):
Image
@Fred: The point is that EWA and tensor Quadratic and Spline preserve fewer rings than some of the more aliased schemes.
Lanczos, which is immensely popular as a downsampling scheme, basically fits between Cosine-windowed Sinc and Ginseng.
It's a "rings/moire" ratio kind of thing.
EWA QuadraticJinc, for example, has very little moire given how many rings it preserves.
Triangle does quite well: decent number of rings, and not much moire.
EWA Robidoux was a pleasant surprise, esp. when compared to Mitchell.
EWA Quadratic is basically moire free, but it does not preserve too many rings.
Etc.
Makes sense?
There is a famous article by Jim Blinn called "What we need around here is more aliasing".
----
This is reducing the 200x200 small rings image of Anthony to 103x103 so that the original is just below Nyquist w.r.t. to its small size version.
P.S. The nice thing for me is that I did this last, and it pretty much confirms what I understood, and my recommendations.
Doing well on this test is not the be all and end all.
But it's another piece of evidence.
P.S.2 And all my "pet method"---Ginseng, EWA LanczosSharp, EWA QuadraticJinc, EWA Robidoux, Triangle and EWA Quadratic---do well "within their class".

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by fmw42 » 2012-09-28T17:57:04-07:00

These pictures are much better at showing the issues. I can see that there are fewer rings (due to blurring, I presume). Interesting that the cosine and ginseng seem to cut off the rings in somewhat of a square pattern (at least to my eyes). I think you should put back in the Lanczos for reference as it is used so much for a standard. Make 4 rows of 4 rather than 3 rows of five.

I am familiar with the Blinn called "What we need around here is more aliasing" article, but have not read that in years.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T18:26:51-07:00

@Fred:
There is a Fourier Transform explanation to this:
Tensor methods will more or less reproduce the frequencies inside a square because their frequency response also is a tensor product so that it has the symmetries of the square.
EWA methods will more or less reproduce the frequencies inside a disk.
(This is badly written, but I think this is enough for you to know what I'm talking about.)

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-28T18:27:33-07:00

I'll add Lanczos.

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by fmw42 » 2012-09-28T19:53:16-07:00

NicolasRobidoux wrote:@Fred:
There is a Fourier Transform explanation to this:
Tensor methods will more or less reproduce the frequencies inside a square because their frequency response also is a tensor product so that it has the symmetries of the square.
EWA methods will more or less reproduce the frequencies inside a disk.
(This is badly written, but I think this is enough for you to know what I'm talking about.)

Yes, that was what I thought also.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-29T05:59:58-07:00

@Fred:
(I imagine you know this already.)
The "rings" test is a way to visualize the frequency response when downsampling, without going through the Fourier Transform.
That is, it allows one to "see" the low pass filtering.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-29T06:15:11-07:00

Latest.
Unless Anthony has something to say, this is "it" for me.
I'll fix the text so as to explain what these methods are doing in the graphs.
Image
I switched to 8-bit png. This is a 219K file. Hopefully small enough.
Last edited by NicolasRobidoux on 2012-09-30T10:20:03-07:00, edited 3 times in total.

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

Re: Enlarge with sRGB, RGB, LAB, LUV, XYZ, sigmoidal...?

Post by NicolasRobidoux » 2012-09-29T10:33:51-07:00

fmw42 wrote:...It seems that very high contrast diagonals are hard...
IMHO, diagonals (or, more generally, narrow oblique lines and sharp oblique, possibly curved, boundaries) is the hard problem. http://arxiv.org/abs/1204.4734 See Theorem 3.5.1 and the following two corollaries.

Post Reply