Page 6 of 10

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-05T08:56:08-07:00
by NicolasRobidoux
This test image:Image

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-05T16:36:51-07:00
by NicolasRobidoux
For orthogonal Lanczos (3-lobe), the contrast that satisfies the criterion is just under 19.22396. Which, I must say, is in the neighbourhood I like according to the "eyeball metric".

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-07T17:35:48-07:00
by NicolasRobidoux
Henry: I'll have to redo the downsampling tests with the newly fixed sigmoidal-contrast code. (IM7 is closest to fixed, and the fix is not complete for orthogonal resize methods with negative lobes.) Other things to do for a while.

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-08T03:58:05-07:00
by henrywho
NicolasRobidoux wrote:Henry: I'll have to redo the downsampling tests with the newly fixed sigmoidal-contrast code. (IM7 is closest to fixed, and the fix is not complete for orthogonal resize methods with negative lobes.) Other things to do for a while.
Remember to include this test case: http://www.4p8.com/eric.brasseur/gamma_ ... a_gray.zip :D

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-08T04:54:12-07:00
by NicolasRobidoux
Henry: "Brasseur test" conclusion: stick to linear light when downsampling.

Re: "Sigmoidal" minimization of resampling filter haloing

Posted: 2012-08-12T17:30:57-07:00
by henrywho
NicolasRobidoux wrote:Henry: "Brasseur test" conclusion: stick to linear light when downsampling.
Seems LUV works very well in Brasseur-Dalai test:

Code: Select all

convert gamma_dalai_lama_gray_tft.jpg -distort resize 50% -quality 95% -sampling-factor 1:1:1 dal_tft.jpg
convert gamma_dalai_lama_gray_tft.jpg -set colorspace sRGB -colorspace RGB -distort resize 50% -colorspace sRGB -quality 95% -sampling-factor 1:1:1 dal_tft_rgb.jpg
convert gamma_dalai_lama_gray_tft.jpg -set colorspace sRGB -colorspace LUV -distort resize 50% -colorspace sRGB -quality 95% -sampling-factor 1:1:1 dal_tft_luv.jpg
convert gamma_dalai_lama_gray_tft.jpg -set colorspace sRGB -colorspace LAB -distort resize 50% -colorspace sRGB -quality 95% -sampling-factor 1:1:1 dal_tft_lab.jpg
But it does not work that well in Brasseur-SR test: http://www.4p8.com/eric.brasseur/gamma-1.0-or-2.2.png

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-12T17:35:02-07:00
by NicolasRobidoux
Henry: Thank you.
-----
I wonder how much these contrived tests really tell us.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-12T23:02:23-07:00
by henrywho
NicolasRobidoux wrote:I wonder how much these contrived tests really tell us.
Sorry being off-topic. Actually I should have posted in another thread where Anthony talks about LAB and LUV.

Even if they are too harsh sometimes, these contrived tests do help revealing abnormality. For example, the LUV-downsize above produces color dots (ring) and blue strip (SR). I guess there are some problems in the LUV codes.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T05:22:04-07:00
by NicolasRobidoux
Henry: No apologies please. I truly appreciate.
My "contrived" musing has to do with the "Brasseur" tests, not yours.
It's just that there are all sorts of artifacts that show up when resampling, and I wonder if these particular ones truly are so important. (I do think they are, but I nonetheless wonder.)
-----
I am convinced that linear light is "it" when downsampling. But I am not certain.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T10:03:10-07:00
by henrywho
NicolasRobidoux wrote:I am convinced that linear light is "it" when downsampling. But I am not certain.
Me neither, especially after Anthony's comment that while linear RGB's intensity is linear, its colors are not.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T12:37:03-07:00
by NicolasRobidoux
Tensor (orthogonal) Cosine and Welch (spelled Welsh in IM) windowed Sincs work really well with sigmoidization (only checked 3 lobes). They could be better than Lanczos 3.
P.S. Tensor Jinc-windowed Sinc is also good. (!)

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T12:52:24-07:00
by fmw42
They could be better than Lanczos 3.
Are you saying that you tried Lanczos 3 and find it not doing so well or that you suspect that Lanczos 3 might work better than the other two windows?

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T13:04:22-07:00
by NicolasRobidoux
What I'm saying is that, since sigmoidization takes care of overbearing halos, I can use less dampening windowing functions than Sinc (which gives Lanczos), like Cosine, Welch and Jinc. Using a window function that does not decay as fast when approaching 1 means that I'm using something which is "closer" to unwindowed Sinc. It looks like the latter (Cosine-, Welch- and Jinc-windowed Sinc) work better than the former (Lanczos = Sinc-windowed Sinc). But this is, of course, very preliminary. And I only looked at 3-lobe, for example

Code: Select all

magick input_small.png -set colorspace sRGB -colorspace RGB +sigmoidal-contrast 25,50% -define filter:filter=Sinc -define filter:window=Jinc -resize 1600% -sigmoidal-contrast 25,50% -colorspace sRGB oSincJinc3.25.png
Clearer?
P.S. Even though there is no theoretical reason for this being good, windowing orthogonal Sinc with Jinc really seems to work well. It's slightly less jaggy, but I can't see more haloing (in my limited tests). Cosine- and Welch-windowed Sincs are also less jaggy, but they are more halo-y.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T13:20:03-07:00
by NicolasRobidoux
Warning: The differences will not jump at you. In the "chip" test image, it's the letter P that tells the most obvious story.
Also: I did not try Cosine and Welch at random: They rank above Lanczos in Adam's reconstruction tests.

Re: "Sigmoidal" minimization of resampling filter haloing &

Posted: 2012-08-13T14:13:44-07:00
by fmw42
Clearer?
Yes, thanks. I believe that you are saying that you tried Lanczos 3 and believe the Welch and Cosine may be a bit better. Is that correct?