Luminous Landscape Forum

Equipment & Techniques => Cameras, Lenses and Shooting gear => Topic started by: griffithimage on August 31, 2012, 11:52:28 am

Title: D800E and moire - calling all studio shooters
Post by: griffithimage on August 31, 2012, 11:52:28 am
Calling all you fashion shooters out there, now there are a few lucky ones out there with the Nikon 800e - are there any complaints regarding moire? This topic has been covered quite a bit on this site for landscape shooters but I wanted to hear from studio types.
Title: Re: D800E and moire - calling all studio shooters
Post by: HarperPhotos on October 29, 2012, 08:11:09 pm
Hello,

Did a road trip on the weekend to a beautiful little town called Te Aroha 2 hours south of Auckland. As I was looking at some of the old buildings I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks.

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: TMARK on October 29, 2012, 08:14:39 pm
I get moire in the studio, but no more so than with the 1ds3 and 5d2.  What throws me is when I'm outside and get moire.  I'm just not used to seeing it in grab shots.

I get less moire in studio than I do from the Aptus 75s.
Title: Re: D800E and moire - calling all studio shooters
Post by: Ellis Vener on October 29, 2012, 09:43:52 pm
Hello,

Did a road trip on the weekend to a beautiful little town called Te Aroha 2 hours south of Auckland. As I was looking at some of the old buildings I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks.

Cheers

Simon
This looks like you've got fine wire window screens over mini-blinds which is a perfect storm for moire formation even without a camera.
Title: Re: D800E and moire - calling all studio shooters
Post by: ErikKaffehr on October 29, 2012, 10:43:00 pm
Hi,

Thanks for posting. Which aperture did you use? Reason I ask that it is expected that diffraction would limit moiré at small apertures.

Do you see that often? Or is this just exception?

I also noticed that the grass in front of the house has odd looks.

Best regards
Erik


Hello,

Did a road trip on the weekend to a beautiful little town called Te Aroha 2 hours south of Auckland. As I was looking at some of the old buildings I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks.

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: Gulag on October 30, 2012, 01:09:29 am
Hello,

Did a road trip on the weekend to a beautiful little town called Te Aroha 2 hours south of Auckland. As I was looking at some of the old buildings I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks.

Cheers

Simon

That can be fixed in Photoshop quickly. Healthy dosage of GB on both A and B channels in LAB should fix it in less than 20 seconds.



Title: Re: D800E and moire - calling all studio shooters
Post by: uaiomex on October 30, 2012, 02:13:13 am
Sometimes I get that same amount of moire with my 5D2. The 5Dv1 was even worse.
Eduardo
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on October 30, 2012, 04:48:43 am
That can be fixed in Photoshop quickly. Healthy dosage of GB on both A and B channels in LAB should fix it in less than 20 seconds.

Hi,

I wouldn't call that fixed. The false colors are gone, but the luminance moiré remains.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on October 30, 2012, 04:55:44 am
Did a road trip on the weekend to a beautiful little town called Te Aroha 2 hours south of Auckland. As I was looking at some of the old buildings I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks.

Hi Simon,

May I ask which Rawconverter you used? The new CaptureOne Pro 7 has improved considerably and produces less obvious aliasing artifacts (even without the moiré tool) as far as the demosaicing part of the equation is concerned, compared to the previous version. Of course that cannot counteract the optical aliasing which is unavoidable in a system without OLPF, but it looks less obvious.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: Gulag on October 30, 2012, 01:21:09 pm
Hi,

I wouldn't call that fixed. The false colors are gone, but the luminance moiré remains.

Cheers,
Bart

Zoom to 1:1 first. If you are still picky, then addition dosage of frequency separation for the problem area will perform magic.
Title: Re: D800E and moire - calling all studio shooters
Post by: HarperPhotos on October 30, 2012, 05:24:54 pm
Hello,

The lens is a new Nikon 24-85mm VR lens which I bought as a walk around and for scouting. The F stop was F9.0.

I did a shot on Friday last of a business man and his very expensive suit also had some moiré in it as well as a a female athlete I shot a few weeks ago had moire in her Lycra suit around her breasts.

I'm not sure what you mean about the grass?

The raw converter I use is ACR CS6. I have had a look with Phase 7 but I could not see any improvement than what I got from ACR.

Off subject I did a comparison yesterday with a Leaf Aptus 75 image at 400ISO in the new Phase 7 and ACR CS6 and in my opinion the ACR did a better job in cleaning up the colour noise.

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: MarkL on October 30, 2012, 05:47:46 pm
I have seen moire twice so far both times in material of clothes when the weave of the fabric has been very fine, pretty easy to remove with moire brush and then frequency separation to put the fabric detail back in. Only occurred on a few frames and only one specific area was affected, the others at a slightly different distance were fine. It shows just how the bigger resolution affects moire that the fabric detail has to be that fine to trigger it. As a torture test I shot a nude pair of womens tights (pantyhose in the US?) at different distances and boy can that trigger luminance moire!

All in all I have had far far more moire problems with my Fuji X100, I'd like to see a test between the E and normal D800 for a moire inducing subject though.



Title: Re: D800E and moire - calling all studio shooters
Post by: ErikKaffehr on October 30, 2012, 11:49:40 pm
Hi,

OK, so we still get color moiré at f/9.

Thanks a lot for the info.

Best regards
Erik

Hello,

The lens is a new Nikon 24-85mm VR lens which I bought as a walk around and for scouting. The F stop was F9.0.

I did a shot on Friday last of a business man and his very expensive suit also had some moiré in it as well as a a female athlete I shot a few weeks ago had moire in her Lycra suit around her breasts.

I'm not sure what you mean about the grass?

The raw converter I use is ACR CS6. I have had a look with Phase 7 but I could not see any improvement than what I got from ACR.

Off subject I did a comparison yesterday with a Leaf Aptus 75 image at 400ISO in the new Phase 7 and ACR CS6 and in my opinion the ACR did a better job in cleaning up the colour noise.

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: kers on October 31, 2012, 07:49:21 am
...OK, so we still get color moiré at f/9....

From what i have seen you have it all  the way to d16 only it gets less pronounced.
But I am very pleased i do not have it more than with the d3x- also because - as stated above- the pattern must be very fine due to the 36MP.
Doing architecture it is a non issue for me.
Title: Re: D800E and moire - calling all studio shooters
Post by: kers on October 31, 2012, 07:59:14 am
I agree the choice of the raw converter can make the difference when you have a moiré issue.
From my experience with the d800e  ACR is showing it more often than others like NX2 and PhotoNinja.
I have an example here where ACR CS6 shows a heavy moire pattern where PhotoNinja resolves the pattern with ease without any traces of moiré.
( But i have not made a study of that )
Title: Re: D800E and moire - calling all studio shooters
Post by: MarkL on October 31, 2012, 08:16:28 am
Should have mentioned my shots were at f/13 and f/9 with a sigma 85mm.
Title: Re: D800E and moire - calling all studio shooters
Post by: MichaelEzra on October 31, 2012, 10:23:56 am
... I took this with the Nikon D800E. As you can see not having a AA filter does have it drawbacks...

Hi Simon, did you try the same image with RawTherapee? The default demosaicing algorithm in RawTherapee (Amaze) works well on suppressing moire. This is a very heavy moire case and it will likely not remove it completely, but I suspect that Amaze might handle this image better than ACR. If you could share raw I can convert it for comparison.

michael
Title: Re: D800E and moire - calling all studio shooters
Post by: bjanes on October 31, 2012, 11:57:32 am
The lens is a new Nikon 24-85mm VR lens which I bought as a walk around and for scouting. The F stop was F9.0.
Simon

Simon,

As an aside, I would be interested in your opinion (as a sophisticated user) of this new lens. I am interested in a walk around lens for my D800e. I saw played around with it the other day at my local Costco (USA discount warehouse) and it was compact and did not seem overly wobbly with its plastic construction.

Other considerations are the new 24-120 f/4, but is is more bulky and not really pro grade despite its pro-grade price. The 24-70 is quite bulky as well as expensive and has limited range. I have the old 35-70 f/2.8 which is sharp and also the old 28-105  f/3.5-f/4.5 D from my film days and have been using these in the meantime. Of course, they can't utilize full resolution of the D800 but give adequate results for small prints and the web. I prefer to save my money for primes and am considering the Zeiss 130 f/2 Apo-Sonnar when it comes out. What do you think?

Thanks,

Bill
Title: Re: D800E and moire - calling all studio shooters
Post by: HarperPhotos on October 31, 2012, 05:36:03 pm
Hello,

Kers I just downloaded PhotoNinja and yes it does reduce the colour moiré.

Michael I downloaded RawTherapee and I didn’t see any improvement in the shot but saying that I have had no experience with both software’s and their interfaces.

Bill I have only had the lens for a couple of weeks and I am very impressed with the resolution. I did however try a number of this lens and found they are not created equal so I would strongly recommend that you try before you buy.

The great thing of course is the VR. My lady and I went to the local museum in Te Aroha and hand holding inside at 8th sec I was still getting sharp images and the lens is just a nice size and weight.

Like you for my paying jobs I go for primes or the pro grade zooms from Nikon but 24-85mm VR is what it is and does a good job at it.

1st shot: 24mm F5.0, 8th Sec, 800 ISO
2nd Shot: 24mm F5.0, 30th Sec, 800 ISO
3rd Shot: 24mm F7.1, 500th Sec, ISO 100  4 shots stitched.

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: bjanes on October 31, 2012, 08:09:16 pm

Bill I have only had the lens for a couple of weeks and I am very impressed with the resolution. I did however try a number of this lens and found they are not created equal so I would strongly recommend that you try before you buy.

The great thing of course is the VR. My lady and I went to the local museum in Te Aroha and hand holding inside at 8th sec I was still getting sharp images and the lens is just a nice size and weight.

Like you for my paying jobs I go for primes or the pro grade zooms from Nikon but 24-85mm VR is what it is and does a good job at it.

1st shot: 24mm F5.0, 8th Sec, 800 ISO
2nd Shot: 24mm F5.0, 30th Sec, 800 ISO
3rd Shot: 24mm F7.1, 500th Sec, ISO 100  4 shots stitched.

Simon,

Thanks for the feedback and the images. The lens does look good for a walk around. The VR is can help make up for the relatively modest aperture and with a walk around one is not shooting from a tripod with liveview and mirror lockup, so the perhaps the resolution is most of what one can expect handheld. The New Zealand landscape is beautiful. I hope I can visit someday.

Regards,

Bill
Title: Re: D800E and moire - calling all studio shooters
Post by: kers on October 31, 2012, 08:24:39 pm
Hello Simon, yes the Nikon 24-85mm VR seems pretty good. A lot of clarity in the images..
I used - like Bill - the 28-105 till the d800e came. Then i thought it was not good enough anymore...
There was no aperture that could make a complete sharp image.
But what i liked about the 28-105 was the macro function that is missing on current zooms.
About raw converters - it is interesting to see that moiré is not only a pixel problem but just as well an interpretation problem.
Title: Re: D800E and moire - calling all studio shooters
Post by: LKaven on November 01, 2012, 01:33:48 am
I wouldn't call that fixed. The false colors are gone, but the luminance moiré remains.

I'd like to suggest that the moiré in this scene is actually in the scene, and produced by the interaction of the venetian blinds with a mesh screen.  The moiré in this case is not produced by an interaction with the sensor so much, but is there to be seen with the naked eye, just as you'd see when looking through two mesh screens.  For that reason, I don't expect the moiré tool to be able to fix that, and I wouldn't fault the camera.
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 01, 2012, 05:59:07 am
I'd like to suggest that the moiré in this scene is actually in the scene, and produced by the interaction of the venetian blinds with a mesh screen.  The moiré in this case is not produced by an interaction with the sensor so much, but is there to be seen with the naked eye, just as you'd see when looking through two mesh screens.  For that reason, I don't expect the moiré tool to be able to fix that, and I wouldn't fault the camera.

Hi Luke,

It's the camera, really, and it does exactly what it was designed for. The proof is in the detail, as shown here (a crop from Simon's image):

(http://bvdwolf.home.xs4all.nl/temp/LuLa/LuLa_Moire.png)

The optics of a camera cannot render detail without a tiny bit of blur, and the demosaicing also loses a few percent of resolution. Yet the zoomed in detail shows single pixel wide horizontal lines, until the phase of the pattern in the image is exactly between two sensels which results in abrubtly no contrast at all. There is no such thing as high contrast single pixel wide detail, unless the detail is exactly the size of the sensel aperture, it is positioned exactly aligned with the sensel, and the lens is (not just theoretically) perfect (= no diffraction and no residual lens aberrations whatsoever).

If it were scene detail that is already aliased because of two overlayed screens, then that wouldn't produce single pixel wide lines, and the angle of the single pixel lines would probably not be as horizontal.

To take away any doubt for the disbelievers, it could help if Simon were able to show a closer view of the detail so we would know what it is that we are looking at.

Mind you, this will only occur in the plane of focus, and with relatively little diffraction, and a decent lens to begin with. This is why it wil not always show, but sometimes it can be a pain for certain subject matter. When prepared for the occasional occurrence of moiré, one could take 2 shots, one regular and one at f/18, and then in postprocessing replace the moiré affected parts with the diffraction smoothed and deconvolution sharpened parts. An even more effective AA-blur would come from a tiny bit of defocus (although we'd have to guess how much is enough), but that could also change the size of the image a bit if the subject is close, making it a bit harder to make a composite.

A shot at f/18 will effectively kill all relevant red and green wavelength resolution (even for the highest subject contrast) beyond the Nyquist frequency of the D800E, so aliasing cannot occur anymore. The Nyquist frequency of the D800(E) sensor is given by its sensel pitch, assumed to be approx. 4.88 micron, which equals 102.459 cycles/mm. Diffraction from a circular aperture for green light (the most important contributor to luminance) will already reduce the modulation transfer at 98 cy/mm to virtually zero. So there is not modulation left at the limit of what the D800E sensor could resolve. Cameras with different sensel pitches will require a different F-stop to totally prevent aliasing, e.g. a 6.4 micron sensor without AA-filter would require f/22.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 01, 2012, 07:33:38 am
One of the interesting aspects of aliasing is that it is non-linear: a frequency of fs/2 will "wrap around" to a frequency of 0. In other words, heavily modulated periodic structures that happen to oscillate at 0.5 linepair/pixel (is this the right terminology?) will result in a sampled signal that has a frequency of zero (depending on phase) - i.e. a constant. In the real world, stuff is never precisely 0.500000..., so you may get something like a rooftop where the tiles are alternating between "black" and "white", where the image file renders the roof as either pure black, pure white, or some non-realistic slow modulation between those two extremes. I can not imageine how a raw developer/plugin could ever detect and suppress such errors without introducing significant errors for desired scene elements. In a properly anti-aliased camera, one would expect such a roof to be rendered as "gray", i.e. the camera/lense works more or less like a linear, space-invariant lowpass filter.

The degree to which this happens (and becomes visible) depends on the scene, and on the degree of prefiltering. Even a D800E, no matter how well focused, expensive optics and heavy stand is used will have some filtering. If nothing else, the spatial extent of the sensel site and micro-filter will "smear" detail and reduce aliasing compared to a hypothetical non-filtered point-sampler. It would be interesting to see examples of such behaviour.

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 01, 2012, 08:04:04 pm
Simon, that's a sharp, vivid shot.

About the color and luminance moire defects, it appears that it is purely a software issue, and despite what the AA filter advocates are saying, an AA filter probably would not have made any difference at all in this shot. The frequency of the blind pattern is about 15% below the Nyquist frequency, which means that the blind pattern is actually larger than what an AA filter is designed to remove. So the the blind pattern would not have been removed by the AA filter in the D800, either.

The color moire is due to the way the raw converter is interpreting the raw data. A different converter (or demosaicking method) will give different results and possibly eliminate the color moire, it not there are the usual, effective tools for removing it.

The luminance moire is another matter entirely. Some valid, un-aliased high-frequency information just cannot look right without some interpolation. This is because, in theory, digital images need a reconstruction filter to turn the individual pixels/samples back to the continuous, analog domain. Digital images often get away without the reconstruction filter step because they don't have a lot of very high frequency detail. The D800E with a good lens can certainly capture a lot of the highest image detail, as you have shown, and can easily produce images that need a little reconstruction filtering.

Here is the proof.

The first image is a 100% crop of one of the windows in your image.

(https://sites.google.com/site/cliffpicsmisc/moire/Harper_window_crop.jpg)

The second image is the Fourier transform of the crop, with the bright spots showing the location of the blind frequencies, about 15% from the edge (where the Nyquist frequencies are).

(https://sites.google.com/site/cliffpicsmisc/moire/Harper_window_crop_DFT.jpg)

The third image is one channel of the crop, which has been interpolated (2X zoom). Note the clean blind pattern.

(https://sites.google.com/site/cliffpicsmisc/moire/Harper_window_2x_green.jpg)

The final image has all three channels interpolated. The luminance moire is gone. The color moire remains because interpolation doesn't help that - it's been baked into the file by the raw converter and can be removed by conventional means..

(https://sites.google.com/site/cliffpicsmisc/moire/Harper_window_2x.jpg)

Cliff
Title: Re: D800E and moire - calling all studio shooters
Post by: MichaelEzra on November 01, 2012, 09:23:04 pm
Cliff, I am curious, which interpolation method was used for 2x zoom?
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 01, 2012, 11:39:01 pm
I used a pure sinc filter (done by FFT like described here (http://www.luminous-landscape.com/forum/index.php?topic=40809.msg340711#msg340711)).

A good Lanczos filter should give similar results. The key is that the filter has good response up to the highest frequencies.
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 02, 2012, 05:45:23 am
The luminance moire is another matter entirely. Some valid, un-aliased high-frequency information just cannot look right without some interpolation. This is because, in theory, digital images need a reconstruction filter to turn the individual pixels/samples back to the continuous, analog domain. Digital images often get away without the reconstruction filter step because they don't have a lot of very high frequency detail. The D800E with a good lens can certainly capture a lot of the highest image detail, as you have shown, and can easily produce images that need a little reconstruction filtering.

Hi Cliff,

That's a good catch by you, again. I was wondering why there were not more obvious luminance aliasing artifacts caused by signal 'folding back' below the Nyquist frequency. As it turns out there was not enough luminance signal to do that because the most significant detail was just below Nyquist, and resolved with enough amplitude. The color demosaicing on the other hand is based on a lower Nyquist limit, and that does mirror back below Nyquist, causing aliases with lower spatial frequencies.

Thanks for spotting that.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: MichaelEzra on November 02, 2012, 12:13:55 pm
I used a pure sinc filter (done by FFT like described here (http://www.luminous-landscape.com/forum/index.php?topic=40809.msg340711#msg340711)).

A good Lanczos filter should give similar results. The key is that the filter has good response up to the highest frequencies.

Thanks. What do you recommend as canvas color in the step "Increase the canvas size on all sides."?
By any chance, would you know any Lanczos filter plugin for photoshop?
Title: Re: D800E and moire - calling all studio shooters
Post by: Rand47 on November 02, 2012, 03:04:01 pm
That can be fixed in Photoshop quickly. Healthy dosage of GB on both A and B channels in LAB should fix it in less than 20 seconds.





Lightroom moire brush:

(http://rsadams.smugmug.com/Landscapes/Landscapes/i-8XGHQGT/0/X2/_LSM0048-X2.jpg)
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 02, 2012, 04:15:52 pm
Thanks for some interesting posts crames.

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 02, 2012, 08:05:45 pm
Michael - use black (0) as the canvas extension color. Feel free to experiment, though.

I don't know of a Lanczos plugin for Photoshop  :( - somebody needs to create one!

Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 03, 2012, 02:52:56 am
I don't know of a Lanczos plugin for Photoshop  :( - somebody needs to create one!
(open source) Image magick contains one of the most extensive sets of linear scaling operators that I have seen:
http://www.imagemagick.org/Usage/filter/nicolas/

Board index ‹ ImageMagick ‹ Users < best downsampling method for DSLR photographs (http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20992&sid=5418e6dc87f52b930666684ec9915aa5)


-h
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 03, 2012, 07:49:22 am
Thanks. What do you recommend as canvas color in the step "Increase the canvas size on all sides."?
By any chance, would you know any Lanczos filter plugin for photoshop?

Hi Michael,

Alternatively you can use ImageJ (http://rsb.info.nih.gov/ij/) to do the FFT conversions, and just fill the canvas space added to the FTT conversion with zeroes (center the Real and Imaginary image data, then add canvas to e.g. 2x the original pixel dimensions).
I prefer using an FFT plugin (https://sites.google.com/site/piotrwendykier/software/parallelfftj) for ImageJ to its built-in FFT functionality. The plug-in allows arbitrary image sizes and multiple threads for the processing, to name a few useful features.

Straight resizing by padding the larger canvas with zeroes does create some visible ringing artifacts to edges.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: bjanes on November 03, 2012, 08:13:14 am
Lightroom moire brush:

I don't see any moire in your reprocessed image, but one should really use a 1:1 view to check for moire. With down sampling, moire can be downsampled out of existence or, alternately, created where it did not previously exist. On one of my computers, the OP's preview image appeared solid gray and the moire was only apparent when viewing the full size image.

As Bart has pointed out, improper downsizing can introduce moire where it was not previously present and low pass prefiltering may be necessary to prevent introduction of moire.'

Regards,

Bill
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 03, 2012, 09:35:54 am
(open source) Image magick contains one of the most extensive sets of linear scaling operators that I have seen:
http://www.imagemagick.org/Usage/filter/nicolas/

Board index ‹ ImageMagick ‹ Users < best downsampling method for DSLR photographs (http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20992&sid=5418e6dc87f52b930666684ec9915aa5)


-h

Hi h,

I was aware of imagemagick and its reputation for quality results, but it's not a PS plugin and I have never managed to sit down and plow through all the options. It is certainly a smorgasbord of lanczos and other filters.

Do you have a script that might work well with Simon's image?

Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 03, 2012, 12:45:00 pm
Do you have a script that might work well with Simon's image?

Hi Cliff,

When you use a Windows system, you can add a batch file to your "Send to" files so the command can be invoked by a right-mouse-click. The batch file could contain something like this:
convert %1 -filter LanczosRadius -define filter:lobes=8 -distort Resize 200%% "%~dpn1_200pct.png"

Otherwise you can use a Command line interface with a command like:
convert {input} -filter LanczosRadius -define filter:lobes=8 -distort Resize 200%% {output}
where {input} and {output} are replaced by the appropriate path/filename.ext .

In the examples above I've used the most recent (LanczosRadius) filter settings that are not available in older versions of ImageMagick, and I've added an option to vary the number of lobes which controls the amount of sharpening/ringing. It is generally not advised to use Lanczos for upsampling (because of the ringing artifacts), but if we want to reconstruct the original signal as good as possible then that's the side-effect (just like with simple FFT upsampling). With a 300% upsampling the result looks even better. Reducing the number of lobes to 3 will reduce the ringing but also reduce the sharpness.

For general upsampling the "-filter LanczosRadius -define filter:lobes=8" part is left out, which will then be replaced by the default filtering that produces a trade-off between various artifacts, but is not as effective in suppressing the artifacts in this example image.
For less specific images that require 'artifact free' upsampling, I get very good upsampling results with the following batch file entry:
convert %1 -set colorspace sRGB -colorspace RGB +sigmoidal-contrast 12.09375 -filter Robidoux -distort Resize 200%% -sigmoidal-contrast 12.09375 -colorspace sRGB -compress None "%~dpn1_200pct-CSpc+sigmoid.tif"
It can also do good downsampling, in this example to an uncompressed TIF format, with modified resize percentages below 100%.

I've used the slower but more accurate (-distort Resize) EWA (cylindrical) version of resizing, IMHO far superior to the traditional (-resize) 2 orthogonal tensor method.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 03, 2012, 02:50:35 pm
Thanks for the info, Bart.

The 8-lobe Lanczos command does give results very similar to my 2X zoom (FFT) example above. It is actually a little less ripply.

The 3-lobe and your general purpose one don't do the job on this image, however.

We have to come up with some ways to reduce the rippling, so D800e users can get the most from their cameras and in an easy way!

attached: the 8-lobe Lanczos version.
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 03, 2012, 04:07:06 pm
The 8-lobe Lanczos command does give results very similar to my 2X zoom (FFT) example above. It is actually a little less ripply.
...
We have to come up with some ways to reduce the rippling, so D800e users can get the most from their cameras and in an easy way!
I am not surprised that 8-lobe lanczos is visually similar to FFT-based scaling.

For linear filtering, there is a relationship between frequency response (wide & flat passband, narrow transition band and lots of attenuation in the stop-band) and ringing. In order to approach a perfect lowpass filter (sin(x)/x), you need to have lots of filter coefficients, some negative and some positive. This means that an image edge will spread out in space and cause undesirable artifacts.

The common (linear) solution to this problem is to either sacrifice passband (blurriness) or stop-band (aliasing). A more advanced solution might be adaptive/non-linear processing.

Did you consider DCT-based scaling rather that FFT-based? I believe that the implicit periodic extension built into DCT might be more suited than the periodicity built into DFT (FFT).

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 03, 2012, 04:45:26 pm
Thanks for the info, Bart.

The 8-lobe Lanczos command does give results very similar to my 2X zoom (FFT) example above. It is actually a little less ripply.

Hi Cliff,

You're welcome. That's probably due to the Lanczos windowing. More lobes will steepen the first ripple amplitude even more, and reduce the other ripples.

Quote
The 3-lobe and your general purpose one don't do the job on this image, however.

We have to come up with some ways to reduce the rippling, so D800e users can get the most from their cameras and in an easy way!

I'm not sure whether both constraints, high amplitude single pixel edges and few artifacts, can be satisfied at the same time in a universal approach. There are also things like diagonal lines that should not go jagged. There can also be a slightly different response between JPEG images and other non-wave based sources. We'll have to see what can be done with some of the other filters.

Cheers,
Bart

Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 04, 2012, 12:42:01 pm
I am not surprised that 8-lobe lanczos is visually similar to FFT-based scaling.

For linear filtering, there is a relationship between frequency response (wide & flat passband, narrow transition band and lots of attenuation in the stop-band) and ringing. In order to approach a perfect lowpass filter (sin(x)/x), you need to have lots of filter coefficients, some negative and some positive. This means that an image edge will spread out in space and cause undesirable artifacts.

The common (linear) solution to this problem is to either sacrifice passband (blurriness) or stop-band (aliasing). A more advanced solution might be adaptive/non-linear processing.

Did you consider DCT-based scaling rather that FFT-based? I believe that the implicit periodic extension built into DCT might be more suited than the periodicity built into DFT (FFT).

-h

Yes it boils down to, hard transitions in the frequency domain (MTF) cause ripples in the spatial domain, and vice versa. The Lanczos filter smooths the transition from full to zero response, with fewer lobes making for a smoother transition. The FFT filter has hard, straight transitions. The key to controlling ripples is the smoothing of the transitions.

I think the DCT will help if the problem is hard transitions right at the border of the frequency domain. Since in the special case of image zooming the transitions end up farther in and away from the borders, the mirroring effect of the DCT probably won't help.
Title: Re: D800E and moire - calling all studio shooters
Post by: LKaven on November 05, 2012, 12:22:31 am
Hi Luke,

It's the camera, really, and it does exactly what it was designed for. The proof is in the detail, as shown here (a crop from Simon's image)

[...]

If it were scene detail that is already aliased because of two overlayed screens, then that wouldn't produce single pixel wide lines, and the angle of the single pixel lines would probably not be as horizontal.

Bart, thanks very much for the detailed explanation!

Luke
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 05, 2012, 02:15:44 am
Yes it boils down to, hard transitions in the frequency domain (MTF) cause ripples in the spatial domain, and vice versa. The Lanczos filter smooths the transition from full to zero response, with fewer lobes making for a smoother transition. The FFT filter has hard, straight transitions. The key to controlling ripples is the smoothing of the transitions.
Yes, it can be described as a classical filtering problem. For many applications, you can even do the design (and thinking) in 1 dimension, extending that solution into 2d by straight separable processing (see image magick forums for dissenting views)
Quote
I think the DCT will help if the problem is hard transitions right at the border of the frequency domain. Since in the special case of image zooming the transitions end up farther in and away from the borders, the mirroring effect of the DCT probably won't help.
Yes you are right, DCT will only affect the virtual padding outside the known image. If that is not the problem, then the DCT may not be the cure.

I see that the (choice of) demosaic process is being partially blamed for D800E issues. There are some nice papers decribing demosaicing in the spatial frequency domain, as a filtering process to separate luminance and color-difference channels. Did you consider taking the FFT of the raw bayer data, identifying various components and extracting them directly (or using the FFT magnitude as a guide to design an optimal spatial-domain filter)? Joint debayer-scaling might make things more complicated, but may be what is needed for optimal results when the camera lacks pre-filtering (and great care is put into maximizing the amount of recorded details).

E.g.:
http://white.stanford.edu/teach/index.php/A_Review_of_Frequency-selection_Demosaicing_Algorithm_by_Shuang_Liu
(http://white.stanford.edu/teach/images/thumb/c/c0/13.png/700px-13.png)

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 05, 2012, 11:55:15 pm

I see that the (choice of) demosaic process is being partially blamed for D800E issues. There are some nice papers decribing demosaicing in the spatial frequency domain, as a filtering process to separate luminance and color-difference channels. Did you consider taking the FFT of the raw bayer data, identifying various components and extracting them directly (or using the FFT magnitude as a guide to design an optimal spatial-domain filter)? Joint debayer-scaling might make things more complicated, but may be what is needed for optimal results when the camera lacks pre-filtering (and great care is put into maximizing the amount of recorded details).

E.g.:
http://white.stanford.edu/teach/index.php/A_Review_of_Frequency-selection_Demosaicing_Algorithm_by_Shuang_Liu

-h

Frequency domain demosaicking appears to be a very promising approach.

Here is a presentation (http://cilab.knu.ac.kr/seminar/Seminar/2007/20071222%20Adaptive%20Filtering%20for%20Color%20Filter%20Array%20Demosaicking.pdf) and paper (http://web.mysites.ntu.edu.sg/zvitali/publications/documents/TIP-02439-2006Print.pdf) by Lian et al., describing their adaptive frequency-domain "AFDemosaick". They also provide Matlab code (http://en.pudn.com/downloads142/sourcecode/graph/texture_mapping/detail619008_en.html) so that it is possible to actually try it on some raw files. It promises to extract lots of luminance detail while controlling color moire and other artifacts.

It would be interesting to try it on some D800E files...
Title: Re: D800E and moire - calling all studio shooters
Post by: meierruedi@hotmail.com on November 06, 2012, 05:17:28 am
Hi griffithimage

As I'm shooting a lot of suits I would never consider the D800e. As you can see I even get moiré with the D800 (shot yesterday). Just to put things into perspective: there's no camera or back I shot that didn't produce moiré in fine fabric....
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 06, 2012, 06:28:32 am
Hi griffithimage

As I'm shooting a lot of suits I would never consider the D800e. As you can see I even get moiré with the D800 (shot yesterday). Just to put things into perspective: there's no camera or back I shot that didn't produce moiré in fine fabric....
Perhaps a Foveon-type sensor or a Bayer + multi-shot (as used by one of the MFDB manufacturers) is suited for your use?

I guess that closing the aperture to the point where fine pattern is smeared out is out of the question?

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: MichaelEzra on November 06, 2012, 07:24:46 am
Just to put things into perspective: there's no camera or back I shot that didn't produce moiré in fine fabric....
Try to use a consumer lens... well, it cures moire
Title: Re: D800E and moire - calling all studio shooters
Post by: meierruedi@hotmail.com on November 06, 2012, 07:51:39 am
Perhaps a Foveon-type sensor or a Bayer + multi-shot (as used by one of the MFDB manufacturers) is suited for your use?


I guess that closing the aperture to the point where fine pattern is smeared out is out of the question?

-h

Thanks for the hints and tips but multi shot won't work as the suits are always worn by living and therefore moving people. I've been following the Foveon development since the beginning and I was always fascinated by this film-like technology but it's not yet meeting my requirements (high ISO). Hopefully one of the big players will take it further one day!

Fortunately I don't experience moiré every day and when I do it's normally no big deal. I just wanted to point out that it happens with practically all cameras and backs.





Title: Re: D800E and moire - calling all studio shooters
Post by: crames on November 06, 2012, 08:31:39 am
Hi griffithimage

As I'm shooting a lot of suits I would never consider the D800e. As you can see I even get moiré with the D800 (shot yesterday). Just to put things into perspective: there's no camera or back I shot that didn't produce moiré in fine fabric....

It's another case where there is color moire with no luminance aliasing. The green channel is clean. The color moire is coming from detail that is larger than what an AA filter will remove.

It is the demosaicking software that is responsible for preventing color moire. For a D800 with or without the E you would have to go to f36 or so to prevent it entirely in-camera.
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 09, 2012, 11:44:11 am
Quick ImageMagick comments:

Bart: When you use -distort Resize, you do not need to specify -filter Robidoux when you want the Robidoux filter, because it is the universal default. Also, recent ImageMagick assumes sRGB unless there is something indicating otherwise, so you almost never need -set colorspace sRGB. (Things have changed a lot this year.)

I've not done any testing on this test image, and I'm still figuring things out, but I think that if you have issues with moire, you should immediately try resampling in linear light (linear RGB in ImageMagick, which also supports XYZ, although I don't know how accurately). You get linear light by omitting the +sigmoidal-contrast  and -sigmoidal-contrast commands (or setting the contrast to 0, which wastes flops, but indicates that the contrast is a sliding scale which you could use to balance aliasing against ugly over and undershoots).

Also: LanczosRadius would not be my first pick to reduce moire.

I'd use -filter LanczosSharp or the variant recommended at the site you already know: http://www.imagemagick.org/Usage/filter/nicolas (http://www.imagemagick.org/Usage/filter/nicolas) (which is already outdated, and suggests, IMHO, too high a contrast value: I think 6.5 is better all around with the Robidoux filter, for example, and going above 7 is probably not "safe" unless you always inspect the results). I'd leave it at the default 3 lobes.

I'm a bit hesitant to make too clear a pronouncement if this does not give you what you want, but maybe you should try Ginseng (if you have an HDRI version of ImageMagick, which my guess is you don't) or the suggested Quadratic Jinc (at the default 3 lobes) or Robidoux if you want even less ringing.

Anyway: I always learn from seeing what people like, so it was interesting to read what you liked.
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 09, 2012, 12:00:15 pm
Also, I'm generally not a fan of filters with more than 3 lobes, but I'd also try

convert {input} -colorspace RGB -filter LanczosRadius -define filter:lobes=5 -distort Resize 200% -colorspace sRGB {output}

for which LanczosRadius happens to give just about the right deblur (.95 or so) if I remember correctly.

(I have not been impressed with Jinc-windowed Jinc 4 lobes, which is why I jump from 3 to 5.)

Note that my comments have to do with resizing. They don't address the issue of moire that's already there.
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 09, 2012, 12:21:32 pm
The Harper_window test picture is awesome!
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 09, 2012, 12:49:15 pm
Quick ImageMagick comments:

Bart: When you use -distort Resize, you do not need to specify -filter Robidoux when you want the Robidoux filter, because it is the universal default. Also, recent ImageMagick assumes sRGB unless there is something indicating otherwise, so you almost never need -set colorspace sRGB. (Things have changed a lot in the last year.)

Hi Nicolas,

Thanks for chiming in here on LuLa, much appreciated.

It's exactly because of the 'relatively recent' changes that I precautiously overspecify some settings, just to make sure that when the suggestions are tried with later versions there is a better chance of them producing the expected results. The suggested commands are examples that can be compacted a bit, I know.

Quote
I've not done any testing on this test image, and I'm still figuring things out, but I think that if you have issues with moire, you should immediately try resampling in linear light (linear RGB in ImageMagick, which also supports XYZ, although I don't know how accurately). You get get linear light by omitting the +sigmoidal-contrast  and -sigmoidal-contrast commands (or setting the contrast to 0, which wastes flops, but indicates that the contrast is a sliding scale which you could use to balance aliasing against ugly over and undershoots).

Yes, makes sense, but then I never promised the ultimate solution to this specific trade-off scenario ;), just a possible direction. I'm not convinced yet that there is a universal solution other than upsampling in Fourier space with proper precautions to avoid ringing artifacts as much as possible (which may proof difficult when one is restricted to a sample from an infinitely repeating pattern).

Quote
Also: LanczosRadius would not be my first pick to reduce moire.

Lanczos windowed Sinc is not my first choice for upsampling either, but I attempted to mimick the behavior of Fourier upsampling by means of simple canvas expansion.

Quote
I'd use -filter LanczosSharp or the variant recommended at the site you already know: http://www.imagemagick.org/Usage/filter/nicolas (http://www.imagemagick.org/Usage/filter/nicolas) (which is already outdated, and suggests, IMHO, too high a contrast value: I think 6.5 is better all around with the Robidoux filter, for example, and going above 7 is probably not "safe" unless you always inspect the results). I'd leave it at the default 3 lobes.

Thanks for your thoughts, I'll also continue experimenting and reading what comes up at the IM discourse server.

Quote
I'm a bit hesitant to make too clear a pronouncement if this does not give you what you want, but maybe you should try Ginseng (if you have an HDRI version of ImageMagick, which my guess is you don't) or the suggested Quadratic Jinc (at the default 3 lobes) or Robidoux if you want even less ringing.

Unfortunately, AFAIK, there are no compiled HDR binary distributions available at the ImageMagick website. When I make suggestions to others, I attempt to do so with links to sources that allow other to repeat the experiments that I mention. It's a pity, because the HDR enabled code allows higher accuracy calculations which takes another uncertainty out of the experiments.

Quote
Anyway: I always learn from seeing what people like, so it was interesting to read what you liked.

I've been promoting ImageMagick for downsampling (http://bvdwolf.home.xs4all.nl/main/foto/down_sample/down_sample.htm) (could use an update with newer IM version, I know) since a long time ago, from my background as a photographer. Upsampling is another one of my fields of attention for potential improvements, and you might e.g. be interested in this discussion (http://www.luminous-landscape.com/forum/index.php?topic=62609.msg505337#msg505337) as well. Improved sharpening (http://www.luminous-landscape.com/forum/index.php?topic=68089.msg538932#msg538932) (which is inevitable in discrete image processing) is yet another one of my attempts to lift image quality to the next level, even with existing tools that don't help our inexact vision enough.

Anyway, thanks for your helpful comments and contributions (here and elsewhere). Especially for photographic images I value the benefits of cylindrical interpolation over 2 tensor methods because I've always wondered how to get rid of jagged edges without creating too many other drawbacks. Processing power increases in recent years should keep the cost of more calulation intensive procedures from becoming obstacles.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 09, 2012, 01:11:51 pm
I do hear that getting HDRI ImageMagick running directly in Windows is a PITA.
Title: Re: D800E and moire - calling all studio shooters
Post by: HarperPhotos on November 09, 2012, 04:41:44 pm
Hello,

Back in the early days when I got my Leaf Aptus 75 I came up against colour moiré.

I bought a number of filters from Caprock and they elevated the problem greatly. You do have to do more sharpening but its a lot easier than trying to remove colour moiré.

http://www.caprockdev.com/antimoire.htm

Cheers

Simon
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 09, 2012, 08:34:38 pm
Bart:

This really is a current favorite? (I'm not arguing: I just find it really really hard to sort out what's better from what's good, and I've programmed so many different schemes with strengths and weaknesses so I have a lot to sort through. This being said, my two very similar variants of EWA LanczosSharp with 3 lobe are winners in my book. And EWA Robidoux has been liked by a variety of people, even though I'm more than a bit iffy about this method. The big surprise is you liking high contrast sigmoidization really surprises me a lot.)

Would you be kind enough to explain what you compared it too, what you saw as good, and what you saw as bad? Here or elsewhere? And email me the link (nicolas.robidoux@gmail.com)?

I'm interested in knowing your favorite(s). I'm not specifically asking because this filter has my name. If you'd rather discuss another filter (I read that you like -distort Resize with the Mitchell filter, for example), I'm still thankful. I'm trying to figure out what to recommend. And what to program into the new GEGLized GIMP when I've put enough money in the bank to afford more pro bono work.
Quote
For less specific images that require 'artifact free' upsampling, I get very good upsampling results with the following batch file entry:
Code:

convert %1 -set colorspace sRGB -colorspace RGB +sigmoidal-contrast 12.09375 -filter Robidoux -distort Resize 200%% -sigmoidal-contrast 12.09375 -colorspace sRGB -compress None "%~dpn1_200pct-CSpc+sigmoid.tif"

It can also do good downsampling, in this example to an uncompressed TIF format, with modified resize percentages below 100%.
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 10, 2012, 05:03:32 pm
Bart:
Now I understand better what you were doing.
I agree that -filter LanczosRadius -define filter:lobes=8 -distort Resize is a reasonable low pass filter that would emulate FFT processing reasonably well.
Let me suggest something, without really knowing how well it will work. This being said, you probably know most of this already.
If you specify a filter (with a recent version of ImageMagick), the short circuit that bypasses the filtering when resizing at exactly the same size will not be turned on.
So, for example

convert Harper_window_crop.jpg -colorspace RGB -filter Jinc -define filter:window=Box -define filter:lobes=8 -distort Resize 100% -colorspace sRGB Jinc8.png

applies a "raw" Jinc-windowed Jinc 8-lobe filter with cutoff frequency matching the Sinc's, to the image without resizing, and

convert Harper_window_crop.jpg -colorspace RGB -filter Jinc -define filter:window=Box -define filter:lobes=8 -define filter:blur=2 -distort Resize 100% -colorspace sRGB Jinc8blur2.png

will apply a similar filter, except that the cutoff frequency is half the corresponding Sinc's.

You can play with blurs that are given by floating point numbers (e.g. blur=1.414213562373). Also, if you want Jinc-windowed Jinc, all you have to do is

convert Harper_window_crop.jpg -colorspace RGB -filter Lanczos -define filter:lobes=8 -distort Resize 100% -colorspace sRGB JincJinc8.png

Also: When the number of lobes is large, LanczosRadius is pretty much the same as Lanczos. And you can replace RGB by XYZ. I think recent versions of IM do XYZ pretty cleanly. But it should not make much of a difference, because there basically is not truncation error when using -distort Resize, and the correspondence between RGB and XYZ is affine (I believe), and we are applying a linear filter (and I'm using an HDRI, that is, floating point, version of IM).

I'd give a shot to Lab, why not? And actually, I'd consider processing the Y channel of XYZ differently than the X and Z ones (use a less blurred version).

-----

I gave a quick try to the above, and the results are underwhelming. But I figured I'd pass the idea along.
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 10, 2012, 09:46:27 pm
Bart:

This really is a current favorite? (I'm not arguing: I just find it really really hard to sort out what's better from what's good, and I've programmed so many different schemes with strengths and weaknesses so I have a lot to sort through. This being said, my two very similar variants of EWA LanczosSharp with 3 lobe are winners in my book. And EWA Robidoux has been liked by a variety of people, even though I'm more than a bit iffy about this method. The big surprise is you liking high contrast sigmoidization really surprises me a lot.)

Hi Nicolas,

Actually, I think it's a sigmodization value I took from one of your earlier posts on the IM discourse server, and it also helped to ameliorate (what I've become to think is) a bug in the EWA '-distort Resize' algorithm. I've also noted that you currently suggest using lower values, which I might agree with, if not for 'masking' this (assumed by me) bug. When I resize this file (http://bvdwolf.home.xs4all.nl/temp/LuLa/PerfectSlant_IJ.png) to 200%, I get a different/incorrect resampling for odd/even horizontal lines of the edge ... My conclusion stems from my research of sharpening mentioned earlier, and has existed for some time already in various versions of IM (so I'm starting to conclude it's not accidental but inherently a systematic flaw, until fixed). I know you are not to blame, I'm just giving some feedback (which probably should be given to Anthony Thyssen (or others) of IM instead).

Quote
Would you be kind enough to explain what you compared it too, what you saw as good, and what you saw as bad? Here or elsewhere? And email me the link (nicolas.robidoux@gmail.com)?

No problem, if things get a bit too much mathematically involved for a Photography forum I will, although some of the members (some are involved with sensor design, or Astronomical digital signal processing, at an academic level, like yourself) are quite capable of adding their informed views (some even beyond my capabilities, I'm not a scholar). We might take this exchange of ideas to a new thread, if desired by the OP or others.

Quote
I'm interested in knowing your favorite(s). I'm not specifically asking because this filter has my name. If you'd rather discuss another filter (I read that you like -distort Resize with the Mitchell filter, for example), I'm still thankful. I'm trying to figure out what to recommend. And what to program into the new GEGLized GIMP when I've put enough money in the bank to afford more pro bono work.

Great, for the advance of imaging technology. My personal preference, if only for the sake of controlability, is to separate the upsampling (or down-sampling for that matter) and its by-products from sharpening (which (additionally) is inevitable after (re-)sampling, IMHO).

My humble research has shown (http://bvdwolf.home.xs4all.nl/temp/LuLa/8104_GreenProfile.png) that the cascaded blur (residual lens design aberrations plus diffraction, combined with the sensor element aperture, and often an optical low-pass filter, or OLPF) of optics (like in regular photographic images) looks quite similar to a Gaussian distributed blur. That also suggests that (re-sampling + additional) deconvolution is a better approach than relying on the edge-contrast enhancing by-products of image re-sampling (which also varies with local contrast).

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 10, 2012, 10:09:46 pm
...this (assumed by me) bug. When I resize this file (http://bvdwolf.home.xs4all.nl/temp/LuLa/PerfectSlant_IJ.png) to 200%, I get a different/incorrect resampling for odd/even horizontal lines of the edge ... My conclusion stems from my research of sharpening mentioned earlier, and has existed for some time already in various versions of IM (so I'm starting to conclude it's not accidental but inherently a systematic flaw, until fixed). I know you are not to blame, I'm just giving some feedback (which probably should be given to Anthony Thyssen (or others) of IM instead)...
When you have a minute, can you be a bit more specific w.r.t. what you expect to see/measure? It certainly does not jump at me.
It's only with -distort Resize, and not -resize?
P.S. This being said, if you use a filter with negative lobes in such a way that over and undershoot are clipped in a different way for the two values that are on the two sides of the interface, you will break the symmetry of the interface. In this case, sigmoidization may help because it limits over and undershoots (in a way that is symmetrical w.r.t. exchanging black and white).
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 11, 2012, 09:53:52 am
When you have a minute, can you be a bit more specific w.r.t. what you expect to see/measure? It certainly does not jump at me.
It's only with -distort Resize, and not -resize?
P.S. This being said, if you use a filter with negative lobes in such a way that over and undershoot are clipped in a different way for the two values that are on the two sides of the interface, you will break the symmetry of the interface. In this case, sigmoidization may help because it limits over and undershoots (in a way that is symmetrical w.r.t. exchanging black and white).

Hi Nicolas,

It took me a bit of time, but I think I have found the issue, and it is not a real bug but a side effect of the linear gamma upsampling.

Downsampling in linear gamma space has some very useful properties, which makes it the recommended practice for me. However, with upsampling it has an IMO nasty side-effect of exaggerating edge sharpness in an ugly way. I say nasty because we have no control over it, unlike post resampling sharpening.

When you look at the attached zoomed-in crops of a 200% EWA upsample, no. 1 is a Linear gamma upsample without sigmoid contrast adjustment, and no. 2 is the same but with a sigmoid contrast of 10. The no. 1 edge looks like it is a dashed line, fading from sharp to fuzzy, it no longer looks like a continuous edge. With the very high sigmoid contrast adjustment added the result is much better controlled, although it would probably be less effective in Simon Harper's image.

To demonstrate that the dashed line upsampling issue I saw is caused by the Linear gamma colorspace, I've added a third crop, like no. 1 without a sigmoid contrast, but also without the linear gamma conversion during the resampling.

Therefore, if we want to maintain the benefits of linear gamma interpolation also for upsampling (although the benefits are larger for downsampling), we can reduce the potentially ugly edge sharpening artifacts by additionally using higher sigmoid contrast adjustments. On the other hand, when we want to reduce the risk of running into issues with limited bit depth images being converted into linear gamma and back, we might as well (QED !) skip the gamma and sigmoid conversions and just use (deconvolution) sharpening to control the edge sharpness.

The benefits of linear gamma interpolation, such as more accurate color transitions, are of course another consideration. But it is good to know that we can then control the severity of the dashed edge effect with the sigmoidal contrast parameter.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 11, 2012, 11:23:07 am
... However, with upsampling it has an IMO nasty side-effect of exaggerating edge sharpness in an ugly way. I say nasty because we have no control over it, unlike post resampling sharpening...
This agrees with http://www.imagemagick.org/Usage/filter/nicolas (http://www.imagemagick.org/Usage/filter/nicolas).
Note that the next update of these recommendations will specify that filters without a significant negative lobe (like Triangle = bilinear, Quadratic = quadratic B-spline smoothing and Spline = cubic B-spline smoothing, in their tensor or EWA versions) actually give fine results upsampling in linear light.
Basically, the nice "physical" properties of linear light partially go out the window when you use filters with significant negative lobes (which can lead to negative light and "whiter than white" light, which is more acceptable from a physical viewpoint but still iffy).
Title: Re: D800E and moire - calling all studio shooters
Post by: NicolasRobidoux on November 11, 2012, 12:54:25 pm
...On the other hand, when we want to reduce the risk of running into issues with limited bit depth images being converted into linear gamma and back, we might as well (QED !) skip the gamma and sigmoid conversions and just use (deconvolution) sharpening to control the edge sharpness...
Provided conversion between colorspaces is sufficiently accurate (and, between linear RGB and sRGB, it is sufficiently in ImageMagick unless you use an 8-bit version), it is not the input or output bit depth that matters, it's what happens within the processing.
-----
Right now, ImageMagick has a split personality w.r.t. sigmoidal-contrast: it uses a clamping LUT in IM6, and a full double precision, but still clamping, version in IM7. When I have time (and money in the bank), I'll reconcile the two and remove the clamping, which should help a little when using an HDRI version of ImageMagick.
I had to rewrite the whole thing so that sigmoidization works properly, and unfortunately did not quite finish the job.
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 12, 2012, 12:43:35 am
Provided conversion between colorspaces is sufficiently accurate (and, between linear RGB and sRGB, it is sufficiently in ImageMagick unless you use an 8-bit version), it is not the input or output bit depth that matters, it's what happens within the processing.
-----
Right now, ImageMagick has a split personality w.r.t. sigmoidal-contrast: it uses a clamping LUT in IM6, and a full double precision, but still clamping, version in IM7. When I have time (and money in the bank), I'll reconcile the two and remove the clamping, which should help a little when using an HDRI version of ImageMagick.
I had to rewrite the whole thing so that sigmoidization work properly, and unfortunately did not quite finish the job.
For testing new ideas, and for passing back and forth algorithms/results for comments and tweaking, I much prefer something like MATLAB: it is double-precision float (pretty much by design), it is often "fast enough" (using libraries like FFTW, BLAS etc), and operations like scaling can be implemented with a fraction of the effort it is to do anything at all in C.

If one is annoyed by the proprietary (and expensive) licensing, there are good open-source alternatives (like NumPy). I would never attempt anything like implementing deconvolution in C without having messed around with algorithm in something like MATLAB. YMMV, and other people may be more skilled in prototyping in C than myself.


If your mission is to provide the world with "the best scaler that is humanly possible" with little regard to cpu cycles, user interface etc, people like myself might be willing to install python and live with quirky command-lines if that means faster development cycles.

Just my 2c.

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: KevinA on November 13, 2012, 06:35:17 pm
That can be fixed in Photoshop quickly. Healthy dosage of GB on both A and B channels in LAB should fix it in less than 20 seconds.




I've yet to see any software fix for moire that removes moire, it might disguise it with a certain degree of success, chances are it leaves luminance banding behind.
Kevin.
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 13, 2012, 07:02:40 pm
I've yet to see any software fix for moire that removes moire, it might disguise it with a certain degree of success, chances are it leaves luminance banding behind.
Kevin.

Yes, aliasing artifacts are by definition permanently mixed with real detail, and as such cannot be separated afterwards. As Cliff has pointed out, what may look as aliasing, may sometimes still be shown as real detail, but we will need to upsample and reconstruct some of the detail by amplifying the correct spatial frequencies to do that. The ringing artifacts must mimick the real detail.

The false color artifacts are related to aliasing artifacts, by the difference in sampling density of the Red and Blue filtered sensels versus the Green filtered ones, and the particular way the Raw converter tries to reconstruct color from an insufficient (and partially more aliased) amount of data. Removing the color will at least mask the more eye catching colorful aberrations. Suppressing real luminance artifacts in the plane of focus is much harder.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 14, 2012, 03:31:23 am
Yes, aliasing artifacts are by definition permanently mixed with real detail, and as such cannot be separated afterwards.
There is no general method to separate aliasing and signal once they are overlapping if we make no assumptions about the true signal and the aliasing.

I believe there to also be no general method to separate signal and noise if we make no assumptions about the true signal and the true noise. The thing is, we can often make assumptions about signal and noise that allows us to do noise-reduction that really reduce the noise while not affecting the signal all that much. Many viewers feel that noise reduction can improve noisy images.

-h
Title: Re: D800E and moire - calling all studio shooters
Post by: Bart_van_der_Wolf on November 14, 2012, 07:07:25 am
There is no general method to separate aliasing and signal once they are overlapping if we make no assumptions about the true signal and the aliasing.

I believe there to also be no general method to separate signal and noise if we make no assumptions about the true signal and the true noise. The thing is, we can often make assumptions about signal and noise that allows us to do noise-reduction that really reduce the noise while not affecting the signal all that much. Many viewers feel that noise reduction can improve noisy images.

That's correct, for single images. Of course when we shoot multiple images of a stationary subject with sub-pixel offsets, then we can resort to things like super-resolution which will allow to increase the Nyquist frequency and thus shift the aliasing threshold. Likewise for S/N ratios we can use HDR exposure stacking, thus cherry picking from the lower shadow SNR levels of the longer exposures, or use exposure averaging which will reduce the noise threshold by the square root of the number of exposures.

Cheers,
Bart
Title: Re: D800E and moire - calling all studio shooters
Post by: hjulenissen on November 14, 2012, 08:20:48 am
That's correct, for single images. Of course when we shoot multiple images of a stationary subject with sub-pixel offsets, then we can resort to things like super-resolution which will allow to increase the Nyquist frequency and thus shift the aliasing threshold. Likewise for S/N ratios we can use HDR exposure stacking, thus cherry picking from the lower shadow SNR levels of the longer exposures, or use exposure averaging which will reduce the noise threshold by the square root of the number of exposures.

Cheers,
Bart
Sure.

My point was that while there is no general method to remove aliasing in a single picture (and I am convinced that it might be proven that no such general method can ever be found), one can imagine non-general methods that exploit assumptions about typical images (or classes of images) and/or the camera sampling process to reduce aliasing without significantly affecting the desired signal, all in a perceptually pleasing manner.

I say this despite my education in signal processing telling me to always properly pre-filter and post-filter a discrete sampling process in the way suggested by Nyquist and Shannon some 90 and 60 years ago. Following the sampling theoreme takes all of the guess-work, statistics and perceptual complexity out, and you are left with a (theoretically) manageable linear filtering problem.

Interestingly, the sampling theoreme does not say that this filter has to be a lowpass filter, only that the bandwidth must be limited. As such, you could sample a scene by taking multiple exposures using an ideal sampler (approximated by a sensor where each sensel has small coverage, approaching a point-sampler), prefiltering using a set of bandpass filters at successively increasing passband (first [0...fs/2], then [fs/2...fs],...). The successive images would be aliased down to the baseband, but as the prefilter removes any non-aliased signal in that baseband, the aliasing components are uniquely resolvable. And a high-resolution image could be synthesized from the set. All according to a theoretical view, not considering the practical difficulty of actually doing it.

-h