sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Anthony:
I still can't reach your machine, but I'm OK with waiting for public versions and taking it from there. I'm not going to sue you for libel or whatever :)
I added a sentence in boldface in the above draft. If you could add something to this effect to "Nicolas' Recommendations", Nicolas would appreciate it.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Fred: If you look at the enlargement of the dragon, it's clear that sigmoidization is good at tightening interfaces which involve extreme values, but not so good at doing so with interfaces that only involve midtones. In a sense, this was on purpose, because the sigmoidal curve is pretty close to being rescaled linear light near middle gray. The rescaling (change of slope) does not affect anything because it is undone at the end.
Again, I don't have time for this now, because I suspect that doing it well is going to involve a fair amount of craftmanship, but this observation suggests that using a sigmoidal parameterized by local values has the potential of being very good.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

I love this:
anthony wrote:Nicolas has a lot more to say...
:)
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Anthony:
Quick correction:

Code: Select all

convert {input} -colorspace RGB +sigmoidal-contrast 9.5 \
          -filter Spline     -resize 500% \
          -sigmoidal-contrast 9.5 -colorspace sRGB {output}
should be

Code: Select all

convert {input} -colorspace RGB +sigmoidal-contrast 10.5 \
          -filter Spline     -distort resize 500% \
          -sigmoidal-contrast 10.5 -colorspace sRGB {output}
because it's supposed to be EWA (and I recommend a slightly higher contrast with this method than with -resize with Quadratic).
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA (-distort resize) LanczosRadius3

Post by NicolasRobidoux »

henrywho wrote:...These light "borders" (halos?) are rather irritating.
Yes they are. This is what sigmoidization is trying to address.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Henry:
Sigmoidization will reduce some of the halos, but when downsampling, it will lead to some colour drift in areas with very dense patterns of various intensity pixels (like in the backpack).
So, you kind of have to choose between overall colour faithfulness (then downsample through linear light) or reducing halos and, slightly, jaggies (use sigmoidization with contrast no more than 6, and probably not more than 4).
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Anthony:
I had forgotten to discuss Ginseng when downsampling, even though it is quite good, probably better than EWA Lanczos Radius 3.
I've added a section in boldface, at the right spot, in viewtopic.php?f=1&t=21850&p=90066#p90066.
With apologies and thanks.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

@Anthony:
I suggest that you NOT add EWA Lanczos Radius 3 as a named scheme.
Even though right now it's my best "sharp" EWA Lanczos.
The reason is that I think that it is likely that within a few months I'll come up with something better.
-----
Ginseng is here to stay, however. I'm impressed.
P.S. I apologize for flip flopping so much about this issue.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by anthony »

NicolasRobidoux wrote:@Anthony:
I had forgotten to discuss Ginseng when downsampling, even though it is quite good, probably better than EWA Lanczos Radius 3.
I've added a section in boldface, at the right spot, in viewtopic.php?f=1&t=21850&p=90066#p90066.
With apologies and thanks.
DONE.

As for the 'radius 3 Lanczos' and Ginseng, I already decided on this course of action for that very reason :-)

What I probably will do is split all the Filter stuff to a separate page to the Resize stuff. This will however involve finding and fixing a lot of links throughout IM examples.

I am also considering a separate section for Interpolation and Virtual Pixels as they are too important to be left in "Miscellaneous".
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: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

I have done a thorough revision of my recommendations after taking the time to organize what I know so it's more easily useable, and also testing more extensively with a number of reasonable alternatives. The fly and the backpack, mostly.
My guess is that the revised version will show up on http://www.imagemagick.org/Usage/resize/#nicolas within a few days.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by NicolasRobidoux »

... and EWA Lanczos3Sharpest, which I don't like for enlarging, is actually turning out to be a reasonable scheme for downsampling. Not a very top choice, but pretty good (given the sharpness).
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: sigmoidized EWA LanczosRadius3 ... and tensor Quadratic

Post by anthony »

Just serious think about and put final conclusions in IM Examples.

Remember this is much more public and slower changing, than the general ramblings and discussions present on the forum.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply