Page 5 of 8

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

Posted: 2012-09-22T22:55:06-07:00
by fmw42
Your sigmoidal-contrast first value 0.45 is so small as to be hardly doing anything, if I am not mistaken. It is nearly a linear function with slope almost unity, thus an no-op situation. What do you get if you remove the -sigmoidal-contrast on both sides? Is it at all visually different?

What is the "default" method?

Can you post the original size building image?

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

Posted: 2012-09-22T23:12:59-07:00
by BryantMoore
fmw42 wrote:Your sigmoidal-contrast first value 0.45 is so small as to be hardly doing anything, if I am not mistaken. It is nearly a linear function with slope almost zero, thus an no-op situation. What do you get if you remove the -sigmoidal-contrast on both sides? Is it at all visually different?

What is the "default" method?

Can you post the original size building image?
Here's take 2.

Image
convert xc: -bordercolor black -border 1x1 -colorspace RGB -sigmoidal-contrast 8x50% -define filter:kaiser-beta=4 -define filter:window=kaiser -filter sinc -distort resize 10000% -sigmoidal-contrast 8x50% -colorspace sRGB -sampling-factor 1x1 -quality 100% -strip 3x3-bamscaler2.jpg
The default method is a -resize without calling a -filter.

Original building image: https://dl.dropbox.com/u/106615031/dsp/ ... 871921.jpg

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

Posted: 2012-09-22T23:17:05-07:00
by fmw42
A sigmoidal contrast value of 8 is more in range with what Nicolas Robidoux has been using.

Are you trying to use the same filter for both enlarging and reducing?

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

Posted: 2012-09-22T23:40:13-07:00
by BryantMoore
fmw42 wrote:A sigmoidal contrast value of 8 is more in range with what Nicolas Robidoux has been using.

Are you trying to use the same filter for both enlarging and reducing?
Yes I am.

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

Posted: 2012-09-23T19:54:52-07:00
by anthony
fmw42 wrote:Your sigmoidal-contrast first value 0.45 is so small as to be hardly doing anything, if I am not mistaken. It is nearly a linear function with slope almost zero, thus an no-op situation. What do you get if you remove the -sigmoidal-contrast on both sides? Is it at all visually different?
values below 1.0 are usless in sigmoidal-contrast. You may as well not use it at all.

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

Posted: 2012-09-27T09:40:22-07:00
by NicolasRobidoux
To illustrate what's going on, I'm going to add some small comparisons to "The Recommendations".
First pass:
Image
Image
Image
Comments?

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

Posted: 2012-09-27T11:00:50-07:00
by NicolasRobidoux
fmw42 wrote:A sigmoidal contrast value of 8 is more in range with what Nicolas Robidoux has been using.
With filters that are not blurry, contrast = 8 is close to the upper end of the "do no harm" range. When enlarging images that have the character of CG or text, or images which don't have extreme pixel values or are greyscale, or blurry images, higher values may work well, esp. with less sharp filters. But lots of images do not fit one of these types.
Maybe sigmoidization is OK with such images when downsampling, but it is generally not safe when downsampling. It's actually slightly evil. (So is sRGB.)
So, I am pretty sure that no sigmoidized scheme should make the "one single scheme for everything" short list.
Because linear light rules downsampling.
So if one single scheme is going to be used for enlarging and reducing, it has to be a linear light scheme. (Does not need to be linear RGB: XYZ works just fine.)
P.S. It's going to be linear light, unless something new is discovered, of course. But at this point, I think that it is unlikely that sigmoidization be worthwhile when downsampling, unless the image has some rather specific characteristics.

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

Posted: 2012-09-27T11:53:39-07:00
by NicolasRobidoux
"Do no harm" is rather stringent a requirement.
With "more good than harm most of the time", the upper range of the contrast is about 13, slightly more for blurry filters like Quadratic and Spline.

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

Posted: 2012-09-27T14:27:08-07:00
by BryantMoore
Perhaps I was too excited to develop my own filter and my naivety got the best of me. I should read more before I pursue this further. :)

I appreciate all the information you guys have given me. :D

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

Posted: 2012-09-27T18:03:43-07:00
by anthony
Can you try the above tables again but using light gray for the line?

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

Posted: 2012-09-27T18:34:48-07:00
by NicolasRobidoux
Image
Image
Image
These images would not encourage people to use linear RGB, because sRGB is pretty good with dark halos. sRGB is worse than sigmoidized and linear RGB with light halos.
Also, thin dark features on a light background are more common than the converse.
But this set makes sigmoidization look pretty good IMHO.

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

Posted: 2012-09-27T18:36:37-07:00
by NicolasRobidoux
If I took sRGB as defining "safe", I'd use a higher contrast.
But sRGB color bleeds a bit too much for my taste. You can even see it in the simplest situation:

Code: Select all

magick -size 2x1 xc:white -fill '#007FFF' -draw 'point 1,0' small.png
magick small.png -filter Triangle -resize 1200x128\! big.png
#007FFF is (R,G,B)=(0,127,255).
Going down from white, it first becomes greenish (turquoise), then reddish (I'm not too good with English color names), and finally goes to the right color.
P.S. This is a bad example: Through linear RGB, it does not look "obviously right" either. The green shift is less pronounced, however.

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

Posted: 2012-09-27T19:07:47-07:00
by NicolasRobidoux
This is exactly the type of image for which more sigmoidization works well:
Image

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

Posted: 2012-09-28T05:32:04-07:00
by NicolasRobidoux
@Bryant:
It was interesting watching you "go".

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

Posted: 2012-09-28T07:44:23-07:00
by NicolasRobidoux
I'm taking out EWA Lanczos2Sharp and adding Cosine-windowed Sinc 3-lobe (a.k.a. -filter Cosine), which is then the sharpest scheme in the collection. Works well with slightly blurry images.