Pages: [1]   Go Down

Author Topic: Major improvement in neutral tone gradient smoothing by dithering  (Read 2232 times)

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2197

I tested the neutral tone gradient smoothness on my Canon 9500 II with Epson Ultra Prem. Glossy by using a full, 256 level RGB patch set printed on 8.5x11 at 300 ppi which I then read with an I1 Pro 2. There was a significant amount of jaggedness to the steps. The L values range from 7 to 93 for (0,0,0) and (255,255,255) but there were 16 instances where consecutive patchs read lower instead of the desired, monotonic behavior.

I then added random numbers in the range of [-3:+3] to each pixel, printed, and scanned the 256 patches.

The result was a significant improvement. The measured L values were monotonic with the sole exception of one case in the first two patches. The second read 6.81 and the first read 7.03.  All other patches increased consecutively. The mean increase was dL of .35.

The standard deviation of the change in consecutive patches dropped from an initial value of .23 to .11.

This level of improvement was more than I expected.

Attached are graphs of the overall L and the change in L between consecutive patches.


Logged

Mark D Segal

  • Contributor
  • Sr. Member
  • *
  • Offline Offline
  • Posts: 12512
    • http://www.markdsegal.com
Re: Major improvement in neutral tone gradient smoothing by dithering
« Reply #1 on: December 28, 2015, 06:27:50 am »

Hi Doug,

This is interesting in light of the very limited instances of non-monotonic behaviour I've observed (other printers and papers) using a grey ramp less refined than the one you created, but nonetheless should only display one direction of change in L* values consistent with the direction of the readings from light to dark or dark to light as the case may be.

I'm curious to know what the underlying principle is of adding the random numbers to each pixel leading to the prediction of the improvement you obtained - and technically how you did it. And what does this tell us about how gradient smoothness from our printers can be improved where evidence shows issues? Your results would seem to indicate that this is primarily a software matter (at which point in the delivery chain?) that you found a way of correcting, such that given the necessary algorithm, the printer itself is pretty capable of delivering the goods.
Logged
Mark D Segal (formerly MarkDS)
Author: "Scanning Workflows with SilverFast 8....."

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Major improvement in neutral tone gradient smoothing by dithering
« Reply #2 on: December 28, 2015, 07:15:04 am »

I tested the neutral tone gradient smoothness on my Canon 9500 II with Epson Ultra Prem. Glossy by using a full, 256 level RGB patch set printed on 8.5x11 at 300 ppi which I then read with an I1 Pro 2. There was a significant amount of jaggedness to the steps. The L values range from 7 to 93 for (0,0,0) and (255,255,255) but there were 16 instances where consecutive patchs read lower instead of the desired, monotonic behavior.

Hi Doug,

That's odd. Could it be that it has something to do with your custom profile, and/or with the 300 PPI instead of 600 PPI driver setting? Or maybe with the readouts of the I1 Pro 2?

I always print on my 9500 II at the highest PPI or quality setting, and experience no jaggedness in smooth gradients, but I've not tried Epson paper on this printer model.

Quote
I then added random numbers in the range of [-3:+3] to each pixel, printed, and scanned the 256 patches.

The result was a significant improvement. The measured L values were monotonic with the sole exception of one case in the first two patches. The second read 6.81 and the first read 7.03.  All other patches increased consecutively. The mean increase was dL of .35.

Well, dithering in general improves gradient smoothness, so that is not a real surprise. In fact Qimage Ultimate has an option to output with or without dithering. The variation added is much smaller though, certainly not +/- 3 but more like +/- 1 at the most. The dithering then simulates a 9-bit color pipeline, increases smoothness, and it's very effective also to reduce minor aliasing artifacts that may result from repetitive patterns with a spacing near the resolution limit, or modest head alignment issues.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2197
Re: Major improvement in neutral tone gradient smoothing by dithering
« Reply #3 on: December 28, 2015, 02:27:15 pm »

Hi Doug,

This is interesting in light of the very limited instances of non-monotonic behaviour I've observed (other printers and papers) using a grey ramp less refined than the one you created, but nonetheless should only display one direction of change in L* values consistent with the direction of the readings from light to dark or dark to light as the case may be.
I've often measured 52 step ramps (0,0,0), (5,5,5),...(255,255,255) to see if there are any variations that might be beyond the profiling software's interpolation. I1 Profiles are generated at roughly 7 step intervals. I had printed a small number of patches at low L values and noticed somewhat large variations between some of them so I made a patch set of all 256, 8 bit neutrals to test the fine grain monoticity. The dEs between patches ideally average just a bit less than 0.4 and these are not visible unless the patches are adjacent and flush with each other. On a slow, gradual neutral ramp these can be just barely seen. With photos they cannot because the shot noise effectively adds dithering in the source image. I only see it with synthetic images and really, just barely even when trying my best to exacerbate the effect.
Quote

I'm curious to know what the underlying principle is of adding the random numbers to each pixel leading to the prediction of the improvement you obtained - and technically how you did it. And what does this tell us about how gradient smoothness from our printers can be improved where evidence shows issues? Your results would seem to indicate that this is primarily a software matter (at which point in the delivery chain?) that you found a way of correcting, such that given the necessary algorithm, the printer itself is pretty capable of delivering the goods.
Basically, adding noise, linearly distributed to the 8 bit pixels, results in about a L standard deviation of around .7dE but that's on a single pixel. The standard deviation over the aperture of the spectrophotometer would be about .02dE which is well below the instrument's capability.

The specific Matlab algorithm was for each bit:
xout=round(xin + 6*rand(1) - 3)
Then clipping the overall image below 0 and above 255
« Last Edit: December 28, 2015, 02:47:57 pm by Doug Gray »
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2197
Re: Major improvement in neutral tone gradient smoothing by dithering
« Reply #4 on: December 28, 2015, 02:43:17 pm »

Hi Doug,

That's odd. Could it be that it has something to do with your custom profile, and/or with the 300 PPI instead of 600 PPI driver setting? Or maybe with the readouts of the I1 Pro 2?
The results are highly repeatable on the I1. The profile is not involved. Generally, when printing through the profile I expect about a 1dE variation for any random color. However, the profile was not used here. This was done by printing the patches directly to the printer using no ICM. Think of the way a patch set is printed by the I1 Profiler. It doesn't use profiles but the results are used to create profiles.
Quote

I always print on my 9500 II at the highest PPI or quality setting, and experience no jaggedness in smooth gradients, but I've not tried Epson paper on this printer model.

Well, dithering in general improves gradient smoothness, so that is not a real surprise. In fact Qimage Ultimate has an option to output with or without dithering. The variation added is much smaller though, certainly not +/- 3 but more like +/- 1 at the most. The dithering then simulates a 9-bit color pipeline, increases smoothness, and it's very effective also to reduce minor aliasing artifacts that may result from repetitive patterns with a spacing near the resolution limit, or modest head alignment issues.

Cheers,
Bart

Yes, while it does seem a bit counterintuitive, dithering is often used to improve linearity and hence accuracy. I've used even more dithering in the past for printers that had severe banding issues such as 4 ink cheapies or laser printers.

This isn't really very much added noise. It's on the order of just the shot noise of a photocell well containing 20,000e-.  Photographs have enough natural noise that this would be redundant for photos.  However, I believe that adding this amount of dithering to a patch print for generating profiles would likely produce more accurate profiles. Since profiles are made from a limited patch set if any of the colors happens to fall on an RGB point that deviates significantly from those around it the profiling software would produce a region where the printed colors could be off significantly. Perhaps several dEs.
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2197
Re: Major improvement in neutral tone gradient smoothing by dithering
« Reply #5 on: December 29, 2015, 11:44:16 pm »

I experimented adding the noise to the printed scan sheet images then making profiles from them. The average dE2k dropped from .68 to .58 on a set of 89 Lab patches I use as a quick profile verification. It dropped to .52 adding another 400 patches using the I1 Profiler "optimize" path.

Note that noise was only added to the patches used for creating the profiles, not the test set that uses the profile.

I also did a "smoothness" test by creating 120 patches centered around L=50 and L=70 with a constant radius of 20 (the C in LCh). These were rotated at 6 degree points for 60 patches on each of L=50 and L=70.

The profiles made from the patches with dither noise were significantly smoother. with the stdev of the dE2k change between consecutive points in the circle decreasing from .42 to .28.  This is a measure of how smoothly the printed patches follow each other around the hue circle. That's a significant improvement in smoothness.

I'm sold. All my future profiles will now be done by dithering the profile patch image. At least for this particular Canon 9500 II. How much this applies to other printers remains to be seen but I now have an easy workflow to do this.

Here's the Matlab code to add the noise to the image tif file.

% AddNoise.m, assume 8 bit, 100 DPI image, which is standard I1Profiler
function AddNoise(filein, fileout)
imaginfo=imfinfo(filein);
imag=imread(filein);
imag=double(imresize(imag,3,'nearest'));  % Convert to 300 DPI before adding noise and to match printer resolution
s=size(imag);   
imag=reshape(imag,[s(1)*s(2)*s(3),1]);
amid = imag<253 & imag>2;  % don't add noise to values near 0 or 255 since the clipping will alias the values
imag(amid)=imag(amid)+round(6*rand(size(imag(amid),1),1)-3);
imag=uint8(imag);
imag=reshape(imag,s);
imwrite(imag, fileout, 'Resolution', 300);

Logged
Pages: [1]   Go Up