Ad
Ad
Ad
Pages: « 1 2 3 [4] 5 »   Bottom of Page
Print
Author Topic: Most favourable up-ressing percentage  (Read 13958 times)
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #60 on: June 25, 2014, 10:44:04 AM »
ReplyReply

Bart:
I am starting to see why you like (I think) EWA Robidoux. Here is what is does with sigmoidization.

Hi Nicolas,

They are all a compromise, but Robidoux (the filter, I wouldn't dare judging you Wink ) is a reasonable one by design, but there are others. The additional Sigmoidization is a bit of a hack, but it works (although the best values can differ depending on image content).

Quote
Code:
magick QuarterZoneplate.png -set colorspace sRGB -colorspace RGB +sigmoidal-contrast 5,84% -distort Resize 230% -sigmoidal-contrast 5,84% -colorspace sRGB -quality 99 230.robidoux.s.5.84.jpg
Not very different from your own. The one's that's different is the one obtained by enlarging directly through linear light, which of course is generally not recommended.

Yes, this shows that (angle independent) preservation of the same amount of resolution that I like, which looks quite natural for well behaved images. The upsample is without too many artifacts (there is a slight amount of moiré, due to gamma or source?).

As a photographer, I prefer natural looking images (artifacts draw attention away from content and creative intent), although viewing distance may be exploited to hide some artifacts that benefit other aspects of perceived image quality. If e.g. stairstepping is too small to be resolved by eye, but it does allow to enhance edge acutance, then I have no problem with that.

Something I also tend to keep in mind is this 1995 Tech memo by a Microsoft employee.

I also think that a relatively soft and artifact-'free' upsampling can be very well combined with subsequent deconvolution, although that will be computationally more expensive at the larger size.

Cheers,
Bart
« Last Edit: June 25, 2014, 10:48:31 AM by BartvanderWolf » Logged
Jim Kasson
Sr. Member
****
Offline Offline

Posts: 838


WWW
« Reply #61 on: June 25, 2014, 11:55:11 AM »
ReplyReply



Something I also tend to keep in mind is this 1995 Tech memo by a Microsoft employee.

Not just any Microsoft employee. PARC, too. Founded Pixar.

You were playing with us, right?

Marvelous, Bart. Thank you.

Jim
Logged

NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #62 on: June 25, 2014, 12:02:19 PM »
ReplyReply

Bart:

Interesting and useful comments and tech report. (Who knew MS employees could be so spunky?).

I agree that often resampling "softly", leaving sharpening for a later stage of the toolchain, is desirable. (This is why I now recommend also the plain EWA Lanczos, not only EWA LanczosSharp 3, LanczosRadius 3 or LanczosSharpest 4, and why I am planning to put RobidouxSoft into ImageMagick.)

I also agree that as it stands now, sigmoidization should not be used "blindly". My opinion is that there is a good idea in there, but the implementation is blunt.

As for "natural looking", I have found that what people find pleasing (or even natural) in (digital) photographs is all over the place. I would bet that what most people find natural and pleasing is different now than it was 20 or even 5 years ago. Cartoon: Pixel art now looks natural.

Resampling is complicated by the lack of standardization of personal tastes.

As for "viewing conditions"... (grin)

Thank you (again),

Nicolas (a reasonable one by design, but there are others)
« Last Edit: June 25, 2014, 12:27:09 PM by NicolasRobidoux » Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #63 on: June 25, 2014, 01:12:17 PM »
ReplyReply

Not just any Microsoft employee. PARC, too. Founded Pixar.

You were playing with us, right?

Hi Jim,

Couldn't help myself. Understatement often works better ...

Here is some more background about Alvy Ray Smith.

Cheers,
Bart
Logged
Jim Kasson
Sr. Member
****
Offline Offline

Posts: 838


WWW
« Reply #64 on: June 25, 2014, 02:01:39 PM »
ReplyReply

Here is some more background about Alvy Ray Smith.

I once participated on a SIGGRAPH panel on color management organized by Efi Arazi. Smith was a follow panelist. It was a humbling experience. A giant.

Jim
Logged

NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #65 on: June 28, 2014, 08:58:40 AM »
ReplyReply

...The upsample is without too many artifacts (there is a slight amount of moiré, due to gamma or source?)...
The sigmoidization values were settled on really quickly so may not be best. (On the other hand the fact that I don't know right off the bat says a lot.) In any case, I am wondering if the "kink" in the S-curve is to blame for the slight moire.
Maybe blending two enlargements, one with a well chosen gamma, the other one with a possibly different gamma >>applied to the negative of the image<< would be a better (but more complicated and expensive) strategy toward avoiding destructive overshoots using a linear filter with negative lobe(s) than using a single S-curve?
That is: Filter within two "kink free" colorspaces, one that suppresses dark halos, the other one that suppresses light halos (gamma "corrected" negative) and blend the results back in linear light.
Something like that was very quickly tried in the early days of sigmoidization. Maybe worth revisiting.
When I have "a minute", I'll have to try.
« Last Edit: June 28, 2014, 09:52:46 AM by NicolasRobidoux » Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #66 on: June 29, 2014, 10:17:35 AM »
ReplyReply

Here is another way of looking at it, I've plotted the noise power spectra of the up-sampled uniform noise image. The images were upsampled with the state of the art EWA algorithm, with the default ImageMagick Robidoux filter.


...
These plots may illustrate why EWA Robidoux probably should not be used to enlarge more than 250% or so unless the image is "soft": This is where the power spectrum goes from being monotone (the higher the frequency, the lower the "response") to having local "peaks". These peaks are low, but nonetheless I would guess that their impact can be seen, at least if one can "pixel peep".
P.S. Of course the fact that EWA Robidoux takes its sweet time to drop near Nyquist...
« Last Edit: June 30, 2014, 01:48:48 AM by NicolasRobidoux » Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #67 on: June 29, 2014, 10:20:52 AM »
ReplyReply

I put a first sample of filtering through an extreme "gamma space" for the purpose of image enlargement as a P.S. to http://www.imagemagick.org/discourse-server/viewtopic.php?f=22&t=21804&p=89751#p89751.
Two more: http://www.imagemagick.org/discourse-server/viewtopic.php?f=22&t=21804&p=89728#p89728 and http://www.imagemagick.org/discourse-server/viewtopic.php?f=22&t=21804&p=89728#p89746, in the P.S. too.
« Last Edit: June 29, 2014, 12:45:49 PM by NicolasRobidoux » Logged
hjulenissen
Sr. Member
****
Offline Offline

Posts: 1679


« Reply #68 on: July 03, 2014, 08:42:31 AM »
ReplyReply

Not sure if I have linked this whitepaper, but I find it interesting since it involves viewers and finding detectability thresholds.
http://downloads.bbc.co.uk/rd/pubs/whp/whp-pdf-files/WHP092.pdf

They find that one can live with slightly lower transmitted resolution in tv systems if some sharpening is applied at rendering.

-h
Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #69 on: July 04, 2014, 05:30:50 AM »
ReplyReply


Hi Nicolas,

Very interesting results. A warning (as you did add) is indeed appropriate, because more images would need to be tested (although I suspect most would survive just fine), but more so because you use an "HDR version" of ImageMagick which is not available as pre-compiled binaries for regular users. The extreme temporary gamma adjustments require floating point calculations for the image to survive.

Nevertheless, it's an interesting angle to look from at the general task of upsampling.

Cheers,
bart
« Last Edit: July 04, 2014, 05:42:34 AM by BartvanderWolf » Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #70 on: July 04, 2014, 05:41:03 AM »
ReplyReply

They find that one can live with slightly lower transmitted resolution in tv systems if some sharpening is applied at rendering.

It's interesting (but not surprising from how our retina is structured) to see how many tests keep confirming the 0.7 - 1.0 minutes of arc as practical resolution limit for viewing. That's why I chose those values in section 1.1 of my DOF Output Quality Planner.

The BBC paper also shows that sharpening of the output can help lower resolution input, but that should hardly come as a surprise.

The lesson one may draw from all that is also that some artifacts may be tolerable when viewed at a small enough scale. However, for large format output, which is why we usually up-sample, small artifacts may become large enough to be seen. So in general, fewer artifacts are better, and subsequent high quality sharpening becomes easier.

Cheers,
Bart
Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #71 on: July 04, 2014, 09:50:51 AM »
ReplyReply

When I still believed in the existence of "free time", I was planning to scan BBC tech reports for goodies. The basis for this New Year resolution was this very article.
Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #72 on: July 04, 2014, 09:56:33 AM »
ReplyReply

...you use an "HDR version" of ImageMagick which is not available as pre-compiled binaries for regular users. The extreme temporary gamma adjustments require floating point calculations for the image to survive.
Indeed. I should have put in big bold letters that users without access to an HDRI version of IM may not get acceptable results because you need the -gamma operation to be accurately invertible. This goes for sigmoidization too. (To make things even more messy, I believe that ImageMagick 7 still has fairly different sigmoidal-contrast code than the widely available ImageMagick 6. IM7's is better.)
This being said, it may work acceptably well when you don't care for 16-bit accuracy in the final result. I've not checked whether the round off error (and LUT) artifacts are visible. But I would not be surprised at all if they are with gamma 32, and would be disappointed but not shocked if they are at gamma 4.
« Last Edit: July 04, 2014, 10:23:30 AM by NicolasRobidoux » Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #73 on: July 05, 2014, 03:33:29 AM »
ReplyReply

My current "short list of recommended ImageMagick image resizing methods": http://www.dpreview.com/forums/post/53970721
Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #74 on: July 15, 2014, 02:38:13 AM »
ReplyReply

I am pretty sure that sigmoidization is now a dead prototype: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=25736&p=113272#p113272
Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #75 on: July 15, 2014, 09:27:22 AM »
ReplyReply

I am pretty sure that sigmoidization is now a dead prototype: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=25736&p=113272#p113272

Hi Nicolas,

Thanks for the progress update.

I'm also wondering if another approach could be easily implemented in ImageMagick. What most of the efforts sofar attempt to do is upsample and minimize artifacts (halo, ringing, blocking, some aliasing). The results look pretty useful. Most filters also attempt to improve the contrast compared to a simple bilinear interpolation (Triangle filter).

However, what about a version of upsampling that is not trying to increase sharpness when upsampling (maybe 'Gaussian'), and add some deconvolution to compensate for the upsampling losses. I understand that it is difficult to dynamically adjust the required (probably Gaussian) PSF radius with variable upsampling percentages, but that would not be too much of an issue if one uses fixed percentages in a batch/script file instead of from the command line console.

Here is an example for a 300% upsample (Windows batch file formatting, allows drag and drop):
Code:
convert %1 -filter Gaussian -distort Resize 300%% -define convolve:scale=^100%%,100 -morphology Convolve DoG:0,0,1.7 "%~dpn1_Gauss+HighPass.png"
The 100% part in the "-define convolve:scale=^100%%,100" parameter, allows to modify the 'amount' of High-pass sharpening. The 1.7 part of the "-morphology Convolve DoG:0,0,1.7" parameter allows to adjust the 'sigma' of the Gaussian High-pass.

This would have the benefit of allowing to control the upsampling artifacts through choice of resampling filter (e.g. Gaussian), and restore some sharpness by using a targeted approach (e.g. High-pass) which should not produce halos (or at least relatively controllable ones) if well dimensioned, or can be used to add a bit of halo to pre-compensate for later losses in our output medium (e.g. ink diffusion).

Of course a real iterative deconvolution method would be able to do an even better job than a simple single High-pass convolution sharpening.
Just some food for thought ...

Cheers,
Bart
« Last Edit: July 15, 2014, 10:10:30 AM by BartvanderWolf » Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #76 on: July 15, 2014, 11:31:50 AM »
ReplyReply

...
Just some food for thought ...
That's why I'm here Smiley
Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #77 on: July 15, 2014, 11:33:51 AM »
ReplyReply

I don't have time to program or test this, but I would guess that a well chosen binomial would work better than a Gaussian.
Probably not a big difference, though.
Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3655


« Reply #78 on: July 15, 2014, 11:44:56 AM »
ReplyReply

I don't have time to program or test this, but I would guess that a well chosen binomial would work better than a Gaussian.

Nicolas, do you mean a Lagrange filter version? I can give it a look.

Cheers,
Bart
Logged
NicolasRobidoux
Full Member
***
Online Online

Posts: 190


« Reply #79 on: July 15, 2014, 12:04:01 PM »
ReplyReply

Nicolas, do you mean a Lagrange filter version? I can give it a look.
I mean this: http://www.imagemagick.org/discourse-server/viewtopic.php?t=22432#p93883
Note: If your idea works well, it will work well enough with Gaussians. What the binomial would do is ensure that your filter is C^0, which is pretty much a necessity when enlarging a lot.
Note 2: There is another direction I'm exploring. I am not sure I can do so in public, however. Need to check.
« Last Edit: July 15, 2014, 12:06:35 PM by NicolasRobidoux » Logged
Pages: « 1 2 3 [4] 5 »   Top of Page
Print
Jump to:  

Ad
Ad
Ad