Using CornerFix‎ > ‎

Maze patterns

An artifact that sometimes comes up when you convert images from cameras with Bayer sensor are maze patterns. An example (image courtesy of Brad Vineyard) is below. Typically these patterns show up most clearly in large areas with the same color, e.g., sky, but actually can exist anywhere in the image. 

Crop from Sony NEX-5 image converted by Lightroom 3.2 at default settings (200%).

While these maze patterns have nothing to do CornerFix - if they exist, you'll see them regardless of whether you've corrected the file via Cornerfix or not - CornerFix has the ability to correct for the problem, assuming you're using an Adobe raw converter (Adobe Camera Raw or Lightroom).

Why do maze patterns happen on Bayer sensors?

In non-technical terms, the problem comes up because of the way that modern Bayer demosiacing algorithms go about extracting the maximum detail possible from an image. Bayer sensors typically have two green channels, and to extract the maximum detail, raw converters like to assume that the two green channels are very closely matched. In other words, they assume that any difference between adjacent pixels from different green channels is actually the result of a real object in the image. Problem is, due to the technology of sensor manufacturing and the way data is read by the camera electronics, that's not always so. There can be differences between the two channels that have nothing to do with anything in the image. 

Fixing the maze pattern problem

In Adobe raw converters, there's a mechanism to tell the demosiacing algorithm how closely or not the two green channels track each other. This is the "BayerGreenSplit" parameter. The Adobe default for the BayerGreenSplit for the NEX image shown above is too low. However, here's what happens if we set the BayerGreenSplit to 500 in a DNG version of the image, and then convert:

BayerGreenSplit set to 500, then converted by Lightroom 3.2 (200%).

Magically the maze pattern vanishes, without any significant impact to image detail.

Unfortunately there's no easy way to change the BayerGreenSplit directly; for whatever reason, Adobe chose not to include BayerGreenSplit as a parameter in their DNG Camera Profiles (DCP files). However, CornerFix has a "hidden" ability to manipulate the BayerGreenSplit value in a DNG file.

Using CornerFix to correct for maze patterns

CornerFix can use special CornerFix profiles (.cpf files) to override the BayerGreenSplit value in any DNG file it processes. However, please note:

  • You must be using CornerFix V1.4.0.2 or later.
  • This only works for Lightroom or Adobe Camera Raw. Other raw converters, so far as I am aware, ignore the BayerGreenSplit parameter in DNG files.
  • When CornerFix changes the BayerGreenSplit parameter, it also changes the Camera Model name by appending "/CornerFix". This is to prevent Lightroom or Camera Raw from recognizing the model name, and using the Adobe default anyway. However, this means that you will not be able to use Adobe Camera profiles with the converted image unless you edit the profile to have the new model name.

The process you need to follow is:

  1. Get a CornerFix BayerSplit profile - there are a variety of pre-built profiles covering a wide range of BayerGreenSplit settings in the ZIP file attached at the bottom of the page.
  2. If your image file isn't already in DNG form, convert it, as described on this page.
  3. Load both the DNG file, and the profile into CornerFix, just as you would if you were devignetting the image, as described on this page. Note that you won't see any change in the image; CornerFix's image display doesn't show enough detail to see the change.
  4. Save the image.
  5. Then load the new DNG file that you saved from CornerFix into Lightroom or Adobe Camera Raw.

Selecting a value for the BayerGreenSplit

Unfortunately, there's no way to know what value will work for the BayerGreenSplit - you just have to use a process of trial and error. Note that the existing BayerGreenSplit, which you can access by setting CornerFix to "Verbose messages" mode is not a good guide to start with; Lightroom and Camera Raw override the value for cameras they recognize, so it is usually set to a high value. Starting with zero is generally a better way. You should then just try increasing values until the maze pattern goes away. Too high a value might lead to some loss of detail.

Combining Devignetting and BayerGreenSplit correction into one step

If you're using CornerFix to devigentte your images as well as to deal with maze problems, the recommended method is to do so in one step, with a single combined profile:

  1. Generate your devignetting profile as usual (you can also use any existing profile, of course). This process is described on this page.
  2. Open your existing devignetting profile with a text editor, and add a line that looks like the following to it:
BayerGreenSplit 500
You add this just above the "end" line. Replace the "500" with whatever value you have found to work well. Adobe states that "useful values are from 0 to 5000". Leave everything else as is.

By way of example, here's an entire devignetting and BayerSplit profile, with the additional BayerSplit line shown in red:

profile_version 1
cornerfix_version 1.3.0.7
description ""
creator ""
copyright ""
licence "This work is licensed under the Creative "
licence "Commons Attribution 3.0 License. To view a copy of this license, "
licence "visit http://creativecommons.org/licenses/by/3.0/ or send a letter "
licence "to Creative Commons, 171 Second Street, Suite 300, San Francisco, "
licence "California, 94105, USA."
LeftHorizonal 0 equation 2 1.000000e+00 -1.701929e-07 2.114596e-14 -2.043448e-21
RightHorizonal 0 equation 2 1.000000e+00 -1.232488e-07 1.355467e-15 -8.729449e-24
TopVertical 0 equation 2 1.000000e+00 -2.903816e-07 1.169707e-13 -3.647586e-20
BottomVertical 0 equation 2 1.000000e+00 -8.926998e-08 -1.246919e-13 3.090077e-20
color 0 equation 2 1.000000e+00 -1.883246e-07 2.122495e-14 -1.341883e-21
BottomRight 0 equation 2 1.000000e+00 -1.388336e-07 6.044672e-15 -1.349633e-22
TopRight 0 equation 2 1.000000e+00 -1.592902e-07 1.097803e-14 -4.965810e-22
BottomLeft 0 equation 2 1.000000e+00 -1.618955e-07 1.256597e-14 -5.688725e-22
center 0 location -10 -122
LeftHorizonal 1 equation 2 1.000000e+00 -1.466988e-07 1.253272e-14 -1.329167e-21
RightHorizonal 1 equation 2 1.000000e+00 -1.063008e-07 -6.122975e-15 5.324453e-22
TopVertical 1 equation 2 1.000000e+00 -2.453555e-07 5.663471e-14 -1.710023e-20
BottomVertical 1 equation 2 1.000000e+00 -6.840060e-08 -1.590840e-13 3.897991e-20
color 1 equation 2 1.000000e+00 -1.610041e-07 1.274781e-14 -7.009662e-22
BottomRight 1 equation 2 1.000000e+00 -1.266264e-07 4.942876e-16 3.316971e-22
TopRight 1 equation 2 1.000000e+00 -1.376776e-07 3.474097e-15 9.193446e-23
BottomLeft 1 equation 2 1.000000e+00 -1.463081e-07 7.585889e-15 -2.149813e-22
center 1 location 1 -122
LeftHorizonal 2 equation 2 1.000000e+00 -1.511571e-07 1.448267e-14 -1.518410e-21
RightHorizonal 2 equation 2 1.000000e+00 -1.084289e-07 -4.049769e-15 2.831658e-22
TopVertical 2 equation 2 1.000000e+00 -1.481634e-07 -4.667805e-14 8.543223e-21
BottomVertical 2 equation 2 1.000000e+00 -1.528736e-07 -5.966654e-14 1.691715e-20
color 2 equation 2 1.000000e+00 -1.488420e-07 9.904034e-15 -4.600982e-22
BottomRight 2 equation 2 1.000000e+00 -1.327082e-07 3.845138e-16 4.335249e-22
TopRight 2 equation 2 1.000000e+00 -1.243614e-07 1.776910e-15 1.259678e-22
BottomLeft 2 equation 2 1.000000e+00 -1.572535e-07 9.234088e-15 -3.137841e-22
center 2 location -2 -9
LeftHorizonal 3 equation 2 1.000000e+00 -1.328712e-07 1.449994e-14 -1.904813e-21
RightHorizonal 3 equation 2 1.000000e+00 -8.700673e-08 -5.979029e-15 1.470460e-22
TopVertical 3 equation 2 1.000000e+00 -1.387800e-07 -3.942716e-14 3.294063e-21
BottomVertical 3 equation 2 1.000000e+00 -1.261547e-07 -7.936528e-14 2.198361e-20
color 3 equation 2 1.000000e+00 -1.368453e-07 1.006282e-14 -6.291270e-22
BottomRight 3 equation 2 1.000000e+00 -1.087999e-07 -4.487942e-15 7.153057e-22
TopRight 3 equation 2 1.000000e+00 -1.071818e-07 1.119964e-17 1.127300e-22
BottomLeft 3 equation 2 1.000000e+00 -1.384568e-07 5.786922e-15 -1.186023e-22
center 3 location -3 -1
BayerGreenSplit 500
end


The pre-built profiles

ċ
BayerGreenSplitProfiles.zip
(12k)
Sandy CornerFix,
Oct 25, 2010, 8:26 AM