On blue channel measurements

An inexpensive way to rapidly access paleoclimatic information?

Last update: 3 March 2020
This section describes how blue color measurements can be done with CooRecorder. The mechanisms for these measurements can also be used to estimate density from gray scale images created from X-ray scans, which is further described in another section.

Blue color intensity measurements on latewood may be an inexpensive way to rapidly access paleoclimatic information, i.e. temperature in earlier years. Density data is known to be related to temperature, though density is difficult and expensive to measure. Recent studies indicate that blue color intensity measurements could be used as kind of a poor mans substitute for density measurements.

By measuring the difference between the color intensity from earlywood and from latewood we can demonstrate a positive correlation to the width of tree rings. This sounds great, though useful blue channel measurements require chemical treatment of the wood samples to first remove resin, i.e. "cooking the wood in alcohol" (Soxhlet extraction). This process requires a laboratory with suitable equipment and precautionary measures to avoid severe hazards!

Recent work behind these studies are reported in:

  1. Blue Reflectance Provides a Surrogate for Latewood Density of High-latitude Pine Tree Rings by D. McCarroll, E. Pettigrew and A. Luckman, Arctic, Antarctic, and Alpine Research, Vol. 34, No. 4, 2002, pp. 450-453
  2. Blue intensity in Pinus sylvestris tree rings: developing a new paleoclimate proxy by Rochelle Campbell, Danny McCarroll, Neil J. Loader, Håkan Grudd, Iain Robertson and Risto Jalkanen. The Holocene 17,6 (2007) pp. 821-828 [view PDF]
  3. Reconstructing Holocene climate from tree rings: The potential for a long chronology from the Scottish Highlands by R. Wilson, N.J. Loader, M. Rydval, H. Patton, A. Frith, C.M. Mills, A. Crone, C. Edwards, L. Larsson and B.E. Gunnarson The Holocene, January 2012; vol. 22, 1: pp. 3-11., first published on July 19, 2011. [view PDF]
  4. Blue intensity for dendroclimatology: Should we have the blues? Experiments from Scotland by Miloš Rydval, Lars-Åke Larsson, Laura McGlynn, Björn E. Gunnarson, Neil J. Loader, Giles H.F. Young, Rob Wilson Dendrochronologia, Volume 32, Issue 3, 2014, Pages 191-204
  5. Blue Intensity for dendroclimatology: The BC blues: A case study from British Columbia, Canada by Rob Wilson, Rohit Rao, Milos Rydval, Cheryl Wood, Lars-Åke Larsson and Brian H Luckman The Holocene published online 12 August 2014
  6. Mauri Timonen at METLA has edited a list at [view PDF] with also these items:

  7. Blue intensity and density from northern Fennoscandian tree rings, exploring the potential to improve summer temperature reconstructions with earlywood information by Björklund, J.A., Gunnarson, B.E., Seftigen, K., Esper, J. & Linderholm, H.W. 2014. Clim. Past, 10, 877–885, 2014. [view] Doi:10.5194/cp-10-877-2014
  8. Blue Intensity in Pinus sylvestris: application, validation and climatic sensitivity of a new palaeoclimate proxy for tree ring research by R. Graham,  I. Robertson, D. McCarroll, N. Loader, H. Grudd, B. Gunnarson in AGU Fall Meeting Abstracts 12/2011.
  9. A critical evaluation of multi-proxy dendroclimatology in northern Finland by Danny McCarroll, Mervi Tuovinen, Rochelle Campbell, Mary Gagen, Håkan Grudd, Risto Jalkanen, Neil J. Loader and Iain Robertson. [view PDF] Journal of Quaternary Science (2010) 25(9999) 1–8, Issn 0267-8179. DOI: 10.1002/jqs.1408
  10. In Kaczka R, Malik I, Owczarek P, Gärtner H, Helle G, Heinrich I (eds.) (2009): TRACE - Tree Rings in Archaeology, Climatology and Ecology, Vol. 7: Proceedings of the DENDROSYMPOSIUM 2008, April 27th – 30th 2008, Zakopane, Poland. GFZ Potsdam, Scientific Technical Report STR 09/03, Potsdam, p. 188 - 195. [view PDF]
My own measurements on blue color have been done on Scots pine (PISY) and on Norway Spruce (PCAB). I have found that data series created from the difference between blue color intensity from earlywood and from latewood ("delta-blue") often has a high positive correlation to the corresponding ring width series. (The minimum blue color from only the latewood has a negative correlation towards the ring width series.)

As an example in this section, I have used series of ring width and of delta-blue values from a trunk of Scots pine from the island of Nämdö and compared that to a tree ring reference curve from that same island. This example shows a clear correlation (0.65) between the delta-blue values of the youngest 50 years of the sample while the oldest 34 years give a much lower correlation (0.42). I assume that this is because of a higher content of resin within the inner part of the trunk than within the outer part. We should then consider that the depositing of resin in the inner part of a Scots pine does (usually) not occur until the tree has become old. So the resin appears within the inner tree rings many years after those rings where formed by tree growth. The result of this late resin deposition might be seen as noise from late time, added to data from older times.

The samples I have analyzed were not chemically treated at all. In spite of the high correlations described here, the case may anyhow be that useful blue color data from Scots pine to be used for climate analysis can only be retrieved after a Soxhlet extraction process has been done on the wood!

How to measure blue channel data with CooRecorder

Where to collect the blue data? Frames of various sizes and with various positions. Norway spruce, PCAB
When doing blue channel measurements with CooRecorder we have to define where the measurements should be done. The measurment rectangels (or frames) can be layed out in various ways across the latewood rings. A number of parameters control how the frames are layed out.

We also have to define what data should be extracted and how it should be processed. E.g. should we collect latewood color and if so, how much of it? Should we look at individual pixels or should we always look at an aggregate of pixels? With different settings for collecting and processing data we will get different results. CooRecorder gives you tools to experiment with different settings.


When you first open the CI-measurements/Settings for color intensity (CI) measurements and calibration, see that the Enable color intensity (CI) measurements checkbox is checked! If this box is not checked all other blue (or other color) channel settings are ignored! Checking this box also makes the lb-icon enabled when there is ring width data available (measurement points). So this "Enable color intensity (CI) measurements checkbox" is the way to turn on or turn off the blue channel measurement mechanism!

To also see the blue channel data (as e.g. "B87") while measuring, you have to set the checkbox "Show CI data when available - see A in picture".


Frame size and placement

Frame size:

  • w: The maximum size in pixels of the frame width is defined by the w parameter, by default 100, though 160 is also found to be a proper value at 2400 dpi resolution.
  • wLimFact: The Frame width limiting factor (wLimFact) is of interest for very thin rings. If the direction between ring width measurement points is not exactly perpendicular to the ring border or there is a winding border, the frame may touch over a neighbour latewood area thereby collecting blue channel data from an incorrect area. The wLimFact parameter is set as a multiple of the current ring width (R). The default value is 3, which means that the actual frame width will never be more than 3 times the ring width (R).
  • d: The maximum frame deepness (d) in pixels defines the maximum deepness of any frame. The actual deepness is anyhow limited by the k parameter, see below.
  • k: When the frame deepness parameter (d) is set high (e.g. at the maximum 500 pixels), the frames will anyhow never touch their next ring width. The actual deepness of the frame is then limited by a margin of k*R to the next ring border. k is typically 0.2 or 0.3 and R is the current ring width.
Frame placement and f:
  • A positive (f)-value means that the frame starts in the earlywood in front of the (distinct) latewood border (as seen from the outside of the stem).
  • A negative f-value will make the frame start inside of the latewood, i.e. f pixels from the ring border measurement point. This is useful when measuring earlywood. With a negative f-value there is then no risk that earlywood from the previous ring is added to the earlywood of the current ring.

Note: CooRecorder will automatically identify light and dark areas within your frames. If you place the frames so there is normally no earlywood inside the frames, then CooRecorder will anyhow divide the frames into light and dark areas and then calculate the minimum blue channel values from the dark areas. Though the extent of the dark areas may then be a matter of chance. Frame settings are best when there is both earlywood and latewood inside the frames!

Data creation
  • Color: You can choose any of the three color channels or a mean value of them all, the Gray channel.
  • Woodtype for data creation: You can create data from either latewood or from earlywood. There is also an option to disregard latewood and earlywood and then collect data from the full ring. This option is only available for the "Mean of sorted pixels" method, see below.
  • Select a Percentage % : You may specify that you want to collect only a part of your latewood or earlywood data.
  • Create color data from dark side (else from light side): When you specify that you want e.g. only 30% of your data that data can be collected either from the darkest side or from the lightest side. This option is only available for the "Mean of sorted pixels" method. For the other method ("Mean of slices", see below), latewood is always collected from around the darkest slice and earlywood from around the lightest slice.

Select by "mean of sorted pixels" or by "mean of slices"

A pixel has three colors, red, green, blue (RGB). Each color is represented as an integer in the range 0 to 255. Before we can calculate the mean value for latewood or earlywood pixels within a frame, we have to decide what is earlywood and what is latewood within that frame. Only then, we can calculate a mean value for the latewood and earlywood colors. We should even be able to calculate that value out of e.g. the darkest 30% of the data points.

With CooRecorder 8.0 there are now two quite different methods for calculating the minimum latewood or maximum earlywood values. These methods differ when it comes to the "priority" of the individual pixel. Should the pixels' "voting" for a color shade be based on the "votes" from individual pixels or from small groups of individual pixels? In the first case we can count also the numbers of very extreme values and later allow for a selection of such values by using a low percentage value and start collecting data from the dark side of the pixel collection. In the second case each small group of pixels will deliver a mean value for the group. Normally this will never become very extreme.


Mean of sorted pixels. 40% of the latewood selected from dark side.

Mean of sorted pixels. With this method all pixels within a frame are sorted into 256 different boxes, one for each shade of blue (or what color you chose). After this sort we know how many pixels there are for each shade. Depending on the distribution of these values we can find a suitable value that divides the pixels into a light group and a dark group and we can find out how many pixels we have in each group. If we now want to know the mean value shade for 10% of the darkest or lightest pixels within one group this can easily be calculated. The consequence of this method is that extremely dark pixels scattered around the image can when sorted together produce a very dark mean value shade. Question is if this really mirrors an interesting property of the wood. Another phenomenon is that encapsulated light areas within the latewood will be considered as not being latewood and thus excluded from the latewood mean value shade. If this is good or not might be questioned.


Mean of slices. 40% of the latewood selected from around the darkest slice.

Mean of slices. With this method we first define a path across the frame. This path corresponds to the path used to set out the ring border points. We then slice the frame across the path and calculate a mean value shade for each slice. Like above we can divide these slices into light and dark ones. In this case we know in which order these "slice-shade" values lay along the path. We can therefore select the very darkest slice and calculate a latewood mean value shade from only nearby slices. This makes it possible to exclude any dark area that is not positioned within the actual latewood area of the ring.

Collecting earlywood data



50% of the earlywood selected from light side ("Create color data from dark side (else from light side)" was UNchecked.)


50% of the earlywood selected from around the lightest slice.

Earlywood and a negative f-value. A negative f value is usually used when you want to extract earlywood data. A negative f will then prevent selection of earlywood belonging to the previous tree ring area.

Medium blue, light cyan and white colors. When using the "Mean of sorted pixels" method, medium blue is used to mark those areas selected for your mean value color. I.e. if you are colleting latewood, then medium blue marks e.g. the selected 30% of the latewood pixels, while light cyan (light blue-green) marks those 70% of the latewood pixels not selected. White then marks those pixels considered as earlywood.
When you are collecting earlywood data, the opposite pattern holds: medium blue corresponds to selected earlywood pixels, light cyan to those left and white is the latewood pixels.

"Mean of sorted pixels", Latewood and Seasonwoodpoints.


Measuring latewood with only ring border points (upper) or also with seasonwood points (lower). White areas are considered as earlywood. (NM115A)

The actual frame deepness for "a latewood frame" will depend also on the existence of a seasonwood point, i.e. the frame will never extend beyond the seasonwood point and thus overlap only a minimum of the earlywood area.

How to show the white/blue frames:

The white/blue frames shown are made visible by checking the checkbox "Show where data is picked to create CI data".

CI Collectors

As described above you can define a number of parameters for how color intensity (CI) data should be collected. There are even three checkboxes for you to specify how  your data should be saved. But all this is "for one setup". And this is how it worked with CooRecorder version 7.8 With CooRecorder 8.0 you can define up to 8 different "Color Intensity Collectors" (CI collectors) where each collector has its own settings like those described above. This means that you can have one collector for collecting data from the full ring while  you also have a collector for just the Latewood section and another collector for the Earlywood section. You can even request data to be calculated as "light blue earlywood minus dark blue latewood", i.e. a "delta-Blue" calculation.

To select a Color Intensity (CI) collector, look for the "radiobuttons array" shown above and click the appropriate button. There is also a checkbox to "enable" the selected CI collector. Please note that when a collector is "enabled", its number will be written bolded together with an underline character, so that you can easily see which collectors will take part in your operations.
Note: To extend the number of CI collectors, use the command CI-Measurements/Change number of Color Intensity (CI) collectors.


Note: If you want to save very different CI collector setups, e.g. if you are doing both Blue channel measurements and Density measurements, then you can save all your current CI collector setup with the command "CI-measurements/Save current CI collectors in a file" and later load them using the command "CI-measurements/Load old CI collectors from file". These files can also be used to easily transfer a CI collectors setup from one computer to another.

Creating and supervising the creation of blue channel data

After you have defined all your CI collectors, you should see that the blue channel data is also actually created. When you click the blue lb button you will be questioned which Color Intensity (CI) collector to run. This way you can easily check how the measurement rectangles are layed out on the image.
Note, that if you change any blue channel setting parameters, you have to recalculate the blue channel values after that! For this, click the lb-button!

Season wood - marking the border between Latewood and Earlywood

When using "Mean of sorted pixels": After you have set out all your ring width measuring points, you can redefine your image as "DPI and data-type/Dendro-Seasonwood". You can then set seasonwood points. For a pine sample it might often be easily done with the menu command More/Add earlywood/latewood border points, though you have to check the setting for all these points. If you then generate CI data (use the blue lb button!) CooRecorders job of finding the latewood data will be made much easier than otherwise.

When this is used for earlywood data generation, there is no longer a risk that any light areas within the latewood will be considered as earlywood, as there is now a well defined border between the two wood types.

Saving your blue channel data

To save blue channel values, see that you (for each enabled CI collector) first check any of the appropriate boxes shown above! After generation of the data you can order saving of the CI data with the command "File/Save CI measurements .wid files AND .pos file if unsaved".

If you have run the data generation for all your CI collectors in one operation (the blue lb button and the checkbox "Run ALL enabled CI collectors (and save .wid-files)?" then all your .wid-files will be automatically saved if you click Ok afterwards! This is very convenient!

The file names for your .wid files: The file names for your .wid files are automatically created so that various parameter settings will be mirrored by the filename itself:

  • NMOEK1A_1_BLWPix30%DS256Inv.wid stands for Collector number 1, Blue (B), Latewood (LW), Mean of sorted pixels (Pix), 30% of the pixels (30%), collected from dark side (DS) using faked ring width algorithm (256Inv).
  • NMOEK1A_2_BEWPix80%LSDelta.wid stands for Collector number 2, Blue (B), Earlywood (EW), Mean of sorted pixels (Pix), 80% of the pixels (80%), collected from light side (LS) and generated as "Delta-Blue" (Delta).

Color values as BI=67 will be written as BI/100, i.e. as 0.67 Any zero value for a color will be written as 0.001 to keep the real zero value as an indication of a missing ring (or missing blue value) as used in both CDendro and CooRecorder.

Note: In the example above there are only two enabled CI collectors which will produce two .wid files when checked as shown here.

Real blue color values have a negative correlation to the corresponding ring width data. With a small modification of the blue channel data, its variations can be made to correlate to the variations of ring width data. A simple method is to use the algorithm "Inverted_color = 2.56 - BI/100"
You can request a .wid file calculated that way by checking the appropriate checkbox shown in the example above.

CDendro: Looking at correlations

In this case I have set up the CI collectors to generate two blue-delta files, one for each method, i.e. one based on "Sorted pixels" and one based on "sliced path". I have also requested a blue latewood file from each method. First I got a message telling what had been generated and a question if the .wid files should be generated.
The two delta-blue files matched each other with a correlation of 0.91 (normalized data, upper curve).
The green curve is based on the "Sorted pixels method" and has a mean value of 0.98 while the other curve based on the "sliced path method" has a mean value of 0.85.
Sliced path method: When matching the delta file to the ring width file the correlation between normalized curves was in the range 0.50 - 0.63 depending on the normalization method used. There is a clear discrimination between the best match and the next best match.
Sorted pixels method: When matching the delta file to the ring width file the correlation between normalized curves was in the range 0.57 - 0.67 depending on the normalization method used. There is a clear discrimination between the best match and the next best match.
Sliced path method: The delta file matched to a ring width reference. The younger part (right) matches best. Another test using the "sorted pixels" method revealed about the same results.
The oldest 34 years have a correlation of 0.42 towards a mean value reference ring width curve, while the youngest 50 years have 0.65. Possibly some soxhleth cooking had made a difference for the older part containing more tar!?
Details of the algorithm for calculating blue data...

When CooRecorder has found out where to place a frame across a ring width border - including latewood and some earlywood, then it is time to find out what is a proper blue mean value shade for the darkest latewood of that frame.

CooRecorder uses an algorithm that looks at all pixels within the frame and sorts them into dark pixels and light pixels. This algorithm adapts to the "background light" to really divide the frame pixels into two groups. If all pixels are dark, there will anyhow be two groups: one darker than the other. After finding that "threshold color index value", CooRecorder knows how to sort the frame pixels into latewood pixels and earlywood pixels. If a pixel has its blue color index below the threshold it is a latewood pixel otherwise an earlywood pixel.

By looking at each pixel of the frame, CooRecorder can now calculate how many latewood pixels (latewoodCount) there are within the frame.

Then we want to calculate a mean blue value for those 30% (settable) of all the latewood pixels which are also the darkest among the latewood pixels.
There are 0.30 * latewoodCount = darkCount pixels within this group.

To find a proper blue mean value for this group we will first count how many pixels there are for each blue shade within this group.

A simple way to do this is to set up an array of 256 elements, colorCount[0..255] where each element colorCount[colorIndex] holds the number of latewood pixels which have their blue shade equal to colorIndex.

We may then calculate the blue mean value like this:

 
Dim darkCount as Integer = 0.30 * latewoodCount  'Number of dark blue pixels to collect for the blue mean value 
Dim collectedPixels as Integer = 0  'current counter for pixels already collected 
Dim toFetch as integer = 0 
Dim bluesum as Integer = 0 
For colorIndex as Integer = 0 to 255  'Loop through the colorCount array and collect the very darkest pixels. 
  If collectedPixels < darkCount Then 
    toFetch = darkCount - collectedPixels 
    If toFetch > colorCount[colorIndex] then toFetch = colorCount[colorIndex] 
    bluesum += toFetch * colorIndex 
    collectedPixels += toFetch 
  Else 
    Exit For 
  End if 
Next colorIndex 
Dim meanBlueDarkColorIndex as integer = bluesum / collectedPixels 
The mean value calculation above is approximatively correct when there are small contrasts within a region. For a region with some high contrasts, the dark areas will dominate more than they should. See the next section.
Lars-Åke Larsson


Copyright © 2019, Cybis Elektronik & Data AB, www.cybis.se