NikonGear'23

Gear Talk => Processing & Publication => Topic started by: Andrea B. on May 31, 2016, 17:39:13

Title: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 17:39:13
The other thread (http://nikongear.net/revival/index.php/topic,3595.0.html) had gotten so long that I thought it best to start a new one.

Recap:  Simone (simsurace) has been helping me with downsizing D810 photos because I have not been happy with results so far when the typical downsizing routines are applied to D810 landscapes. In Part 1, I worked through some examples to convince myself of a few things. In summary:
New:  Simone supplied a Siemen's Star PNG to test downsizing methods. (Thanks again!!) So now I'll run through a few typical downsizing algorithms with that.

Photo 1:
  Here is an unresized crop of the center of the Siemen's Star so you can see some of the (false?) detail.
Photo 2: This is an unresized crop of an area to the right of center.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Frank Fremerey on May 31, 2016, 17:41:50
A great proof, that downsizing happens in the forum software. What came through of what you posted is some fractal compression algorithm no Simens star:

Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Frank Fremerey on May 31, 2016, 17:44:15
This is a Siemsstar: http://www.ngn-studios.de/uploads/media/Siemensstern.jpg

testing to embed this link:(http://www.ngn-studios.de/uploads/media/Siemensstern.jpg)
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 17:46:21
That is interesting.

My Siemen's Star crop is 406 x 406 pixels and is not downsized by the forum software.
Right click it and select View Image Info. Then look for the pixel dimensions to see 406 x 406.

So what you are seeing - or rather not seeing - is the "compression" from your display resolution.

I am on a Macbook Pro Retina, and I can see every detail.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 17:48:52
Well, anyway, onward to the downsizing tests.

I fear this may not work out well for anyone not having a high resolution display, but I will trudge onward.

Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 17:51:52
[LATER EDIT:  I replaced the 1000px resizes with 920px resizes for more useful matching with some later images.]

TEST:
  Downsize the 7360 x 4912 px Siemen's Star to 1000px 920px width with no new sharpening after the downsize.

Photo 1 :: Capture NX2 downsize to 1000px 920px width with no new sharpening after downsize.
Photo 2 :: Photo Mechanic downsize to 1000px 920px width with no new sharpening after downsize.
Photo 3 :: Photoshop Elements 11 downsize to 1000px 920px width with no new sharpening after downsize.

CONCLUSION ::
On a Macbook Pro Retina screen, the downsize in Photo 3, made with PSE Bicubic Sharper, retains more center detail.
The downsizes made in NX2 and Photo Mechanic have both lost some center detail.
The Capture NX2 downsize is a bit better than the Photo Mechanic version.
Count the rings from the center to see that the NX2 downsize loses large amounts of detail in the first 3 rings,
while the PhoMechic downsize loses detail in the first 4-4.5 rings.

ADDED LATER:  Actually it is not center detail that we should worry about so much. We know we are going to lose center detail in this kind of star with tiny 1-pixel frequency detail. What happens in the slightly larger areas is what we want to look at I think.
Note :: Be sure to expand your browser so that you can view the full 1000 920 pixel width.
Right-click the photo and select View Image Info to verify this by checking that the displayed dimensions are 1000 x 667 px 920 x 614 px.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: zuglufttier on May 31, 2016, 18:10:40
I really don't understand what you are trying to proof... There are differences in downsizing algorithms, true. But what else?

Btw: OS X just doubles every pixel on a retina screen on normal settings, it's the same as setting everything to 200% in Windows. You can do that with a lower resolution screen, too.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 18:20:42
As stated, I have been unhappy with the downsizing of my D810 landscapes. None of the usual downsizing methods seem to work well for these big files. They turn out blocky or crunchy sometimes.

We all got to talking about it, Simone offered some help and so I decided to test the various downsizing methods to see which one works best for downsizing D810 landscapes which have 36 megapixels and lots of high frequency detail. We have some "accepted wisdom" about downsizing. But is it myth or is it true?

Nothing to prove. Just trying to learn.  ;D

Added a minute later:  I have a Toshiba Windows laptop on which I will also view the results. Our downsizes posted for web display should be viewable with reasonable detail on both types of machines.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: zuglufttier on May 31, 2016, 18:58:55
Can you provide the Siemens star you used for downsizing? I'd like to try it myself ;)
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 19:29:20
Simone provided the star here:  https://www.dropbox.com/s/hijmrelhpaesijt/Siemens.png?dl=0
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 19:35:13
A stepped percentage downsizing has been advocated for better results. Is this a myth or is it true?

TEST:  Using the PS Bicubic Sharper algorithm, downsize the 7360 x 4912 px Sieman's Star in three steps of 50% each to reach a final 922 px width. Compare that to a direct downsize to 922 px.

CONCLUSION:
  There is a peculiar asymetric effect in the direct downsize that is not present in the stepped downsize. So the stepped downsize is probably better.

NOTE 1:  You may not be able to see these downsizes well on iPhone or iPad because of the weird way they resize images? And I do not know if the details will show up on a non-Retina screen?? You will have to let me know. I added a blowup of part of the two downsizes in hopes you can see some details.
NOTE 2:  Be sure to expand your browser to display the full 920 px width.

PHOTO 1: Stepped downsize.
PHOTO 2: Direct downsize.

Photo 1 Blowup
Photo 2 Blowup
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Frank Fremerey on May 31, 2016, 19:43:30
I cannot see any of them in a sensible way,
Neither on my 24 inch IPS with 1920x1200 qpixels
Nor on my 5.5 inch AMOLED with 1280x786 qpixels

This might be interference patterns with the screen resolutions
and they change when I zoom the pictures on the screen

Sooo.

With resizing as with sharpening your target medium is
the important  value.

My screens are not able to reproduce your Simensstars

But they are able to reproduce the Simensstar I posted.

Food for thought?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 19:48:51
Yes, the target medium is important.

I just changed my Macbook Retina Display size to 1920 x 1200 pixels. The preceding JPGs are crystal clear. So it is apparently not your 1920 x 1200 resolution, per se, which prevents you from seeing the images on your IPS display.

(What does IPS stand for?)
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 19:58:20
oh In-plane Switching.

Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on May 31, 2016, 19:59:00
The direct downsize has a darker pattern in the center which adds contrast and removes detail. The stepped downsize seems to be the better option because it retains the fine detail.

This is apparent on my 13" Retina MCP, NEC P221w, as well as my cheap Dell 20" 2nd monitor.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 20:06:02
Yes. Agreed. Thanks Charlie.

Before going any further, I have to vent that I really do not want to have to perform stepped downsizes !!! But if that is where this effort leads, well, then.......at least I'll know what method is best even if I don't want to do it.  :P :P :P

I'm going to look for some other downsizing algorithms now.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Frank Fremerey on May 31, 2016, 20:34:22
I rest my case. Your target audiences are Mac users with Retina Display and Apple Application Environment.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 20:37:28
Frank pay attention:  Charlie can see the photos here on two monitors which are NOT Apple - namely a NEC P221w and a Dell 20".

Charlie wrote:  This is apparent on my 13" Retina MCP, NEC P221w, as well as my cheap Dell 20" 2nd monitor.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on May 31, 2016, 20:38:12
I rest my case. Your target audiences are Mac users with Retina Display and Apple Application Environment.

I don't know that I am the target audience, but my NEC and Dell monitors are plugged into a Win 10 machine.


Before going any further, I have to vent that I really do not want to have to perform stepped downsizes !!! But if that is where this effort leads, well, then.......at least I'll know what method is best even if I don't want to do it.  :P :P :P

I hear you, who wants to drag everything into photoshop for downsizing?
Of course, what applies to this Siemen's Star pattern may not be necessary for real world photographs. I've been happy with my D800 downsizes coming out of Lightroom but I don't scrutinize the fine details excessively either. 

That said here is a (1) Photoshop CC stepped by 50% downsize (2) Photoshop CC direct downsize (3)and Lightroom direct downsize

Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 20:42:10
TEST:  Resize the Siemen's Star to 922 px width using Affinity which offers two versions of the Lanczos3 resizer and one version of a Bicubic resizer.

PHOTO 1:  Affinity Lanczos3 Separable downsize.
PHOTO 2:  Affinity Lanczos3 Non-separable downsize.
PHOTO 3:  Affinity Bicubic downsize.

CONCLUSION:  [Later]
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 20:44:12
Charlie - THANKS for your downsizes !!! This is great to have. I don't have Lightroom, so it's great to have that one especially. I know so many people do use LR.

Can you please specify what Photoshop downsizing algorithm you chose?

Yes, I agree that downsizing a Siemen's Star may not necessarily hold for many 'real-world' images. But the high frequency of detail in this particular Star might be helpful for deciding which downsizing algorithm is best for D810 landscape images. We don't know yet.

The loss of center detail should be no surprise to anyone? We know we are going to lose that in a downsize. But how far from the center do we lose detail?

And has anyone noticed any chromatic aberration induced in some of the images? Or maybe we should call that "color artifacts induced by resizing".
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 20:53:01
Edit Note:  I have to replace my Affinity downsizes because I accidently put 922 pixels into the resize box instead of 920 pixels. Duh!! I know 2 pixels likely make no difference, but I'm going to fix it anyway.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on May 31, 2016, 21:09:36
Sorry to chime in so late. I hadn't noticed that you started a second thread.
To Frank or anyone who wonders why the Siemens star (original png) doesn't look like a Siemens star inside the smallest red circle:
At the periphery of the smallest red circle, the spacial frequency of lines is equal to the Nyquist frequency for the full-res image. Therefore, what is inside the smallest circle is stuff that can never be represented (resolved), not in the original png, and even less in any down-sized version of it.

(side-remark: if you print out a very high-res print of a Siemens star and photograph it, your lens will blur the central part because that part contains detail that is smaller than what the lens can resolve. If the lens is very sharp and can resolve it, your AA filter will take care of it. If even that fails, you will get interference patterns (moiré) in your raw file)

When downsizing, you want to make sure that you understand which is the circle that is closest to the Nyquist frequency of the downsized image. For example, if you downsize to ~1000px width, that would be the seventh circle (counting from the inside). Anything that is inside that circle is detail that exceeds the Nyquist limit, and will therefore exhibit false patterns (interference).

You want your sharpening to have a strength that gives a nice rendering of what's outside that circle, and not accentuate too much any false patterns within the circle.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on May 31, 2016, 21:16:04
I have to remark that the LR direct downsize looks very good. It would be nice to know exactly what Lightroom does.
The Lanczos and bicubic blur the central part a bit too much in my judgement, making it almost in a uniform grey.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on May 31, 2016, 21:21:14
Of course, what applies to this Siemen's Star pattern may not be necessary for real world photographs. I've been happy with my D800 downsizes coming out of Lightroom but I don't scrutinize the fine details excessively either. 
I'm happy if someone finds a case where a sharpening algorithm that works well on the Siemens star will produce a bad result on a real image. But I guess it would be hard to construct such a case.
If anything, I think that the Siemens star test yields makes one sharpen conservatively, leading to a sharpening amount that is on the low side of things.
You are happy with the LR resizes, great! Incidentally, it is also the algorithm that looks best so far on the Siemens star.
Let's all switch to LR then  ;)
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on May 31, 2016, 21:47:36
Charlie - THANKS for your downsizes !!! This is great to have. I don't have Lightroom, so it's great to have that one especially. I know so many people do use LR.

Can you please specify what Photoshop downsizing algorithm you chose?

The Photoshop examples were downsized with bicubic sharper. Lightroom was downsized with no output sharpening applied  I have included some more Lightroom examples with output sharpening applied. For those not familiar with Lightroom the export dialog box has an option for sharpening. Sharpening types includes Screen, Matte, & Glossy and strengths include Low, Standard, and High, no other adjustments or information is given. And for the record I am not at all familiar with Nyquist frequencies, limits, or Siemens star testing  :)

(1) no sharpening applied
(2) screen low setting and
(3) screen high setting.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 22:20:35
Thanks again Charlie.
My eyes have started to dance now from looking at all these lines.  ;D :P ???

****

Simone, to be clear, the inner circle is #1?
Thus in concentric circle #2 we have the black space between the white lines increasing from 1px to 2px.
And in cc#3, the black spacing increases from 2px to 3px.
And so forth. (Eventually the white lines themselves seem to grow larger too.)

But -->>>>>> I'm not sure how to translate signal/sample statements to photographs!
The white/black pixels are equivalent to the sine wave peaks?
So, Nyquist tells us that we need at least a 2 pixel width sample in order to resolve pixel detail?
Thus any resizing which does not preserve that destroys detail?
Am I anywhere in the ball park?  ::)

I've resized everything (and Charlie too) to 1/8 the original size, so my 2 pixel sample should move out to the 7th? or 8th? circle?
 
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on May 31, 2016, 22:42:20
TEST:  Compare two Bicubic Sharper downsizes. The first had a 1px Gaussian Blur applied before the downsize. The second did not.

Photo 1:  Gaussian blur before downsize.
Photo 2:  Downsize only.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on May 31, 2016, 23:31:57
Simone, to be clear, the inner circle is #1?
Thus in concentric circle #2 we have the black space between the white lines increasing from 1px to 2px.
And in cc#3, the black spacing increases from 2px to 3px.
And so forth. (Eventually the white lines themselves seem to grow larger too.)

But -->>>>>> I'm not sure how to translate signal/sample statements to photographs!
The white/black pixels are equivalent to the sine wave peaks?
So, Nyquist tells us that we need at least a 2 pixel width sample in order to resolve pixel detail?
Thus any resizing which does not preserve that destroys detail?
Am I anywhere in the ball park?  ::)

I've resized everything (and Charlie too) to 1/8 the original size, so my 2 pixel sample should move out to the 7th? or 8th? circle?

Actually, your questions just made me realize that during the export from the program I used to make these star patterns, something went wrong. The black lines got too thick and the whites too thin.

I wanted them to be a sine, so the white and black should be equal in size. I will post another version where this is corrected.

The period of the sine is two pixels long at circle #1. It is 4 pixels long at circle #2. It is 6 pixels long at circle #3. Etc. At least that's how I planned it to be, and I will just shortly upload another file where this is the case. In the file that you have been using so far, the black parts are too thick, but the spacing is still correct. There is 4px worth of space between the start of one black line to the next at circle #2.

Nyquist tells us that when the sine grating is horizontal or vertical, it cannot have a frequency of less than one cycle per two pixels. That would be one black line followed by a white line followed by a black line (in the best case scenario where the grating is in phase with the pixel grid).

Resizing will never preserve that detail, since in the resized image the smallest detail is still one cycle per two pixels, but that detail was much bigger in the original file. The detail which is smaller than that needs to be toned down in order to avoid these interference patterns inside the new Nyquist circle.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on June 01, 2016, 01:05:25
Thanks!  We will start over when we get the new star.

"One cycle per two pixels" is the phrase I was looking for. Thanks again!
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: bjornthun on June 01, 2016, 01:27:38
When, I look at the result images, the red sircles themselves becoming a part of the patterns created, thus perturbing the result of the Siemens star downscaling slightly. On the other hand I realize their importance as a reference guide.

Does the jpeg compression algorithm affect the visible results?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Andrea B. on June 01, 2016, 01:53:23
Does the jpeg compression algorithm affect the visible results?

Good question.
My answer:  Not by any amount that I can detect if the JPG is saved at the highest quality.It is difficult to actually illustrate, but I am going to attempt it.I blew up (by 500%) the display of a downsized TIF (made using Bicubic Sharper in PSE11) and made a screen shot of a portion of it. Then I took the same screen shot from that TIF after converting it to a JPG.

When looked as Difference layers in PS, there is no obvious difference between the two screen shots. The extremely minor differences which can be brought out by certain extreme slider settings are mostly very very small contrast changes. There is no difference in detail - no details are lost.(Side Note:  I converted the original PNG created by Simone to a 16-bit TIF before working with it because not all my photo apps will deal with a PNG.)

Photo 1 :: JPG screen shot made from TIF.
Photo 2 :: JPG screen shot made from JPG.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on June 01, 2016, 09:03:07
Here is the new star:
https://www.dropbox.com/s/i2dvybcqb0cakmh/Siemens3.png?dl=0 (https://www.dropbox.com/s/i2dvybcqb0cakmh/Siemens3.png?dl=0)
Title: What about Upsizing?
Post by: ColinM on June 01, 2016, 11:52:39
Hi Andrea, Simone, when you've got downsizing sussed out to your satisfaction, I'd be interested to know your views on Upsizing.

I'm about to prepare some files for an online print service and normally just use PS bicubic - any advice on best options would be appreciated.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on June 01, 2016, 18:44:43
I've redone the downsize with the new star and this time included Capture One as well as Photoshop Save For Web. This time the stepping down 50%resulted in a final 921 px image so everything was sized to match 921 px.

(1) Photoshop CC Stepped 50% with image size tool - bicubic sharper
(2) Photoshop CC Direct Downsize with image size tool - bicubic sharper
(3) Photoshop CC Direct Downsize with Save For Web Tool - bicubic sharper
(4) Lightroom Direct Downsize no sharpening applied
(5) Capture One 9 Direct Downsize no sharpening applied
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on June 01, 2016, 18:50:07
So.... what is it exactly that we are looking for in all of these anyway  ???

Each one looks a bit different from the others but what exactly makes for a better or worse downsize?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on June 01, 2016, 18:53:30
Upsizing is potentially much more complicated. I think bicubic interpolation is a good start.

The 'Save for Web' resize of PS seems to be similar to the direct resize in LR. Not surprising. I wonder why the image size dialog produces a lesser (in my view) result? What was that resize optimized for? Is it a relic from the past?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on June 01, 2016, 19:03:17
So.... what is it exactly that we are looking for in all of these anyway  ???

Each one looks a bit different from the others but what exactly makes for a better or worse downsize?

I think there are two features that are appearing again and again in some resizes that I find undesirable:
1) A solid, clearly delineated grey area in the middle,
2) False patterns outside the Nyquist circle (in your factor 8 resize it would be the eighth circle).

The first feature suggests that the low-pass filter (blurring) applied before downsizing is too strong and has a relatively hard cutoff. Therefore we see detail up to a certain point and no detail (also no false detail) beyond that. A real image will likely have some smearing effects, similar as to when too much noise reduction is applied. But this may be tested on an actual image to see whether this intuition is correct. It might look ok with images that are more graphic in nature (no fine textures or none that are interesting), less ok with natural objects where we expect fractal detail (e.g. we are happier to see something that resembles grass, even when the grass is too thin to be resolved, instead of just a green smear. Because the grass is irregular, we are unlikely to see the interference that plagues the Siemens star).

The second feature is due to oversharpening in the detail that can in principle be resolved accurately. In regularly patterned subjects, this will lead to funny patterns that are clearly recognized by the viewer to be fake.

The LR resize and the 'Save for Web' resize of PS don't show either of those two features. The small detail smoothly fades away towards the center and outside circle #8 there are no (or very weak) interference patterns.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on June 01, 2016, 19:53:10
It seems the Capture One downsize shows the smoothest fade towards the center and least amount of interference patterns, no?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: Akira on June 01, 2016, 23:55:06
Thanks, folks, for all the effort!

It seems the Capture One downsize shows the smoothest fade towards the center and least amount of interference patterns, no?

Yes, I would agree.  Also, "Save for Web" (bicubic sharper) seems to be handy and fairly efficient, though not as good as C1.
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: simsurace on June 02, 2016, 00:28:24
It seems the Capture One downsize shows the smoothest fade towards the center and least amount of interference patterns, no?
I prefer the other two I mentioned because it is not clear to me what purpose the central blob in the Capture One resize serves. Do you have an idea?
Title: Re: Downsizing Challenge Part 2: The Siemen's Star
Post by: charlie on June 02, 2016, 00:35:32
I prefer the other two I mentioned because it is not clear to me what purpose the central blob in the Capture One resize serves. Do you have an idea?

I do not have any idea.