• site home
  • blog home
  • galleries
  • contact
  • underwater
  • the bleeding edge

the last word

Photography meets digital computer technology. Photography wins -- most of the time.

You are here: Home / The Last Word / Color photography without demosaicing in practice

Color photography without demosaicing in practice

April 18, 2014 JimK Leave a Comment

Yesterday’s post trotted out an idea for producing moderate resolution files from high-resolution cameras without demosaicing, and speculated that such files might show higher quality and fewer artifacts than similar-sized filed down-res’d from demosaiced raw files.

I looked around for a tool to perform an experiment. I didn’t have to look far. DCRAW has an option, -h, that produces a half-sized image using the idea that I proposed in yesterday’s post, right down to averaging the two green channels. I took a raw file of an ISO 12233 chart made with the Sony a7R and the Zeiss 135mm f/2 Apo Sonnar ZF.2, and “developed” in in DCRAW three ways, with the four-pixels-into-one half-sized option, and demosaiced using bilinear interpolation and adaptive homogeneity-directed demosaicing. I brought all the images into Photoshop, down-res’d the demosaiced images by 50% using bilinear and bicubic sharper, and stacked them up in five layers. On the bottom, the four-pixels-into-one image, above it the bilinear-interpolation-demosaiced images down-res’d both ways, and above that the adaptive homogeneity-directed demosaiced images down-res’d both ways. I put a curves layer on top of everything to set the black and the white point.

The two images that were down-res’d with bilinear interpolation were both softer than their bicubic sharper counterparts, and didn’t have significantly fewer artifacts, so I ignored them. The differences between the images demosaiced with the two quality settings were minimal, so I ignored the bilinear interpolation demosaiced one.

Overall, the image processed without demosaicing had greater microcontrast, but more false-color artifacts and more evidence of luminance aliasing artifacts. This was a surprise to me.

Take a look at this section of the target, enlarged 300% using nearest neighbor.

First with conventional demosaicing:

demosaiced

And with the four-pixels-into-one technique:

4to1

Take a look at the vertical bar on the left which has a slanted, but mostly horizontal, grating of increasing spatial frequencies running from top to bottom. Notice that in both images, the apparent frequency actually drops from above the “5” to above the “6”, further drops above the “7”, then starts to increase again. This is classic aliasing, where spatial frequencies above half the sampling frequency appear at lower than half the sampling frequency. It occurs in this section of the image at much higher contrast in the four-pixels-into-one case than in the demosaiced case.

To see what happens with spatial frequencies below the Nyquist frequency (half the sampling frequency), look at the variable-pitch horizontal grating to the left of the zone plate at the top of the image. The lines at about 3.5 are at the Nyquist frequency. You can see that the contrast at that point in the demosaiced image is close to zero, which is appropriate. So there’s antialiasing filtering in the combination of the demosaicing and the down-sampling. It’s not a brick-wall filter, though; the contrast of the area above the “2” is adversely affected compared to the four-pixels-into-one image.

If you look below the “3” at the slanted, but mostly vertical grating at the bottom center, you’ll see what happens to spatial frequencies just below the Nyquist frequency. They are reproduced with greater contrast in the four-pixels-into-one case, but there’s more false color.

The four-pixels-into-one technique doesn’t produce the anticipated freedom from false color with test charts. It appears that the sophistication of the current demosaicing techniques is enough to overcome any advantage that might accrue to the four-pixels-into-one approach.

As we’ve seen with cameras that omit the anti-aliasing filter, sometimes approaches that don’t work well for test charts are good for some real-world subjects. I’ll look at that next.

The Last Word

← Color photography without demosaicing Color photography without demosaicing in the real world →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

May 2025
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Articles

  • About
    • Patents and papers about color
    • Who am I?
  • How to…
    • Backing up photographic images
    • How to change email providers
    • How to shoot slanted edge images for me
  • Lens screening testing
    • Equipment and Software
    • Examples
      • Bad and OK 200-600 at 600
      • Excellent 180-400 zoom
      • Fair 14-30mm zoom
      • Good 100-200 mm MF zoom
      • Good 100-400 zoom
      • Good 100mm lens on P1 P45+
      • Good 120mm MF lens
      • Good 18mm FF lens
      • Good 24-105 mm FF lens
      • Good 24-70 FF zoom
      • Good 35 mm FF lens
      • Good 35-70 MF lens
      • Good 60 mm lens on IQ3-100
      • Good 63 mm MF lens
      • Good 65 mm FF lens
      • Good 85 mm FF lens
      • Good and bad 25mm FF lenses
      • Good zoom at 24 mm
      • Marginal 18mm lens
      • Marginal 35mm FF lens
      • Mildly problematic 55 mm FF lens
      • OK 16-35mm zoom
      • OK 60mm lens on P1 P45+
      • OK Sony 600mm f/4
      • Pretty good 16-35 FF zoom
      • Pretty good 90mm FF lens
      • Problematic 400 mm FF lens
      • Tilted 20 mm f/1.8 FF lens
      • Tilted 30 mm MF lens
      • Tilted 50 mm FF lens
      • Two 15mm FF lenses
    • Found a problem – now what?
    • Goals for this test
    • Minimum target distances
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Printable Siemens Star targets
    • Target size on sensor
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Test instructions — postproduction
    • Test instructions — reading the images
    • Test instructions – capture
    • Theory of the test
    • What’s wrong with conventional lens screening?
  • Previsualization heresy
  • Privacy Policy
  • Recommended photographic web sites
  • Using in-camera histograms for ETTR
    • Acknowledgments
    • Why ETTR?
    • Normal in-camera histograms
    • Image processing for in-camera histograms
    • Making the in-camera histogram closely represent the raw histogram
    • Shortcuts to UniWB
    • Preparing for monitor-based UniWB
    • A one-step UniWB procedure
    • The math behind the one-step method
    • Iteration using Newton’s Method

Category List

Recent Comments

  • JimK on Goldilocks and the three flashes
  • DC Wedding Photographer on Goldilocks and the three flashes
  • Wedding Photographer in DC on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Fujifilm GFX 100S II precision
  • Renjie Zhu on Fujifilm GFX 100S II precision
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF

Archives

Copyright © 2025 · Daily Dish Pro On Genesis Framework · WordPress · Log in

Unless otherwise noted, all images copyright Jim Kasson.