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 (-distort resize) LanczosRadius3

Post by NicolasRobidoux »

henrywho wrote:And some time ago I have tested downsizing of black and white texts with EWA lanczos3, catrom and lagrange. I remember that EWA lagrange produces dark halos more than white halos. Perhaps it's the reason I like it better.
Did you resample through linear light or straight sRGB?
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 »

@Fred:
Here is one quick example of what sigmoidization does with tensor quadratic B-spline smoothing, which has no negative lobe:
Straight through sRGB:
Image
Sigmoidized, with contrast = 10.5 (just like recommended above):
Image
Through linear RGB:
Image
The code:

Code: Select all

magick input_small.png -colorspace RGB +sigmoidal-contrast 10.5 -filter Quadratic -resize 800% -sigmoidal-contrast 10.5 -colorspace sRGB dragon.Quadratic.Sig10p5.png
magick input_small.png -colorspace RGB -filter Quadratic -resize 800% -colorspace sRGB dragon.Quadratic.RGB.png
magick input_small.png -filter Quadratic -resize 800% dragon.Quadratic.sRGB.png
See what I mean? It's no contest.
Last edited by NicolasRobidoux on 2012-09-16T11:43: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: sigmoidized EWA (-distort resize) LanczosRadius3

Post by NicolasRobidoux »

More examples of what sigmoidization does with tensor quadratic B-spline smoothing:
Straight through sRGB:
Image
Sigmoidized, with contrast = 10.5 (just like recommended above):
Image
Through linear RGB:
Image
Last edited by NicolasRobidoux on 2012-09-16T11:22:25-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: sigmoidized EWA (-distort resize) LanczosRadius3

Post by NicolasRobidoux »

More examples with tensor quadratic B-spline smoothing:
Straight through sRGB:
Image
Sigmoidized, with contrast = 10.5 (just like recommended above):
Image
Through linear RGB:
Image
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 »

Yet more examples with tensor quadratic B-spline smoothing:
Straight through sRGB:
Image
Sigmoidized, with contrast = 10.5 (just like recommended above):
Image
Through linear RGB:
Image
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 »

Yet more examples with tensor quadratic B-spline smoothing:
Straight through sRGB:
Image
Sigmoidized, with contrast = 10.5 (just like recommended above):
Image
Through linear RGB:
Image
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 »

I hope that these last results are not corrupted by viewtopic.php?f=3&t=21873.
P.S. They are not, but my code was wrong: mistmatched contrasts. Fixing up.
P.S. Fixed.
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 »

Based on these tests (and others), maybe contrast 10.5 is a bit high even with quadratic B-spline smoothing. I'll tone it down in the above recommendations.
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 »

I am uploading your text -- formating it as I go... This is just an interum post.

I have been making some minor changes, to try and make things clear, and to fit larger numbers of reference links to other areas of IM Examples.

Hmmm Cubic is not longer a recommended filter name (though it does work), It is now the more accurately named Spline. Cubic should only be used as a 'common name' for all named and unamed Cubic filters (specifically the general cubic function), especially when generating your own DIY cubic B,C values.

This is a bit like FastSinc is used to select polynomial Sinc function. That is also another reason why a "Ginseng" fillter should only set a Jinc window function, and let IM default to FastSinc for the weighting function by not setting that.
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 »

anthony wrote:...
Hmmm Cubic is not longer a recommended filter name (though it does work), It is now the more accurately named Spline. Cubic should only be used as a 'common name' for all named and unamed Cubic filters (specifically the general cubic function), especially when generating your own DIY cubic B,C values...
I completely agree with this change, and actually thought that it was confusing Cubic was dual purpose.
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: Note that I've been making really minor changes, the last one at 2012-09-16T15:38:05+00:00, about 6 hours before your last post above.
-----
Thank you!
I hope that this gets me more feedback on these bleeding edge methods.
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 wrote:...This is a bit like FastSinc is used to select polynomial Sinc function. That is also another reason why a "Ginseng" fillter should only set a Jinc window function, and let IM default to FastSinc for the weighting function by not setting that.
This also makes complete sense.
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 »

Okay You can see the results on my IM Example test site (my own workstation, limited access, I'll PM you the URL).
It will upload automatically in about 18 hours, unless I manually do it on your OKAY.


Hmmm I really think it is time to split Resize into "Resize" and "Resampling Filters". Just the index at the top is getting too much :-)

Spliting is a pain as I have to search through ALL Im Example pages and re-direct all the appropriate links. But it is time.
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 »

@Anthony:
At some point I'll compute the "new and improved FastSinc" using the state of the art methods I developed when my student Chantal Racette was in the last miles of her Masters.
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: sigmoidized EWA (-distort resize) LanczosRadius3

Post by henrywho »

NicolasRobidoux wrote:Did you resample through linear light or straight sRGB?
I did it in linear light.

Actually, it is an incorrect description. When downsizing, EWA Lagrange generates "only" a dark "border" around a sharp edge (as in 2-lobe Lanczos and Cubic) but 3-lobe Lanczos generates a dark "border" followed by a light one (... and 5-lobe Lanczos generates another pair). These light "borders" (halos?) are rather irritating.
Post Reply