Home > Software > TMSB Tutorial 4C: Andrea G. Blum Colour Combination XML File
TMSB Tutorial 4C: Andrea G. Blum Colour Combination XML File
This example is a good example of how a seemingly-simple functional description can be interpreted in numerous different ways. It is based on a request by Andrea G. Blum to provide a way for TMSB to generate (automatically) a false colour compositing method she used ("Purple-Orange-Blue/Green"):
[ Note: Paraphrased slightly. ]
I multiply (128, 0, 255) over the photo for the purple UV layer, (255, 128, 0) for the IR orange, and (0, 255, 128) for the VIS green-with-half-blue colour with no name, then diff the stack.
[ Note: "green-with-half-blue colour with no name" is a reference to a discussion we had in which I mistakenly assumed she was using cyan, which is not the case. ]
Andrea was unavailable to elaborate on this description at the time, so I started to think of all the implementations of this description. Handling the infrared and ultraviolet images is easy (although, to be completely accurate, there are a number of alternate options for those too), but I thought of five different ways of handling the human-visible image before converting it to bluish-green (the diagram shows six, but I left out the median method in the actual test configuration). In addition, I eventually came up with five methods of handling the difference operation (one of them uses sum instead of difference, so feel free to leave that one out).
Permutations Of This Model | ||||||||
|
|
|||||||
The various permutations of the two major stages of this compositing method that came to mind. |
Example Images 2 | ||||||||
|
|
|||||||
A few additional examples of this technique applied to a flower photo and a landscape shot.
Date Shot: 2010-07-07 (Big Bend), 2010-10-16 (Flowers)
|
This gives between 16 and 30 possible variations, all of which produce visibly different results.
These instructions assume that the reader has obtained basic familiarity with editing TMSB XML files by following the instructions in the first tutorial (TMSB Tutorial 4A: Basic XML File Customization). Following the other preceeding tutorials first is also a good idea.
Like all of the tutorial configuration files, complete (and tested) versions of the results below are included in the Tutorial subdirectory of TMSB_Config wherever you unpacked the software to (TMSB version 1.2 or later). These can be used to refer to if you run into trouble, or you can just copy them into your TMSB_Config directory if you would rather just use them instead of know how to create custom configurations.
This tutorial will cover the processing approach that turned out to be match Andrea's technique, which is the "absolute difference" method. For purposes of simplicity and brevity, it will also only cover two of the options for handling the human-visible component: leaving the three channels unchanged, and using the maximum value of the three channels. The prebuilt configuration file included in the Tutorial subdirectory of TMSB_Config has all of the variations.
Getting Started
Unlike the previous tutorials, in this one the entire configuration will be created from scratch, but we'll be reusing the <Metadata> block, so it's easier to start by copying an existing file.
<StatisticalGreyscaleCubes>
</StatisticalGreyscaleCubes>
<CustomGreyscaleChannels>
</CustomGreyscaleChannels>
<CombinedBandChannels>
</CombinedBandChannels>
<CalculatedChannelSets>
</CalculatedChannelSets>
<CustomThreeChannelImages>
</CustomThreeChannelImages>
<DCSVariations>
</DCSVariations>
<TintMapping>
</TintMapping>
<GradientMapping>
</GradientMapping>
<GenerateStatisticalChannels>
false
</GenerateStatisticalChannels>
<GenerateCalculatedChannels>
false
</GenerateCalculatedChannels>
<GenerateCustomChannels>
false
</GenerateCustomChannels>
<GenerateTintedImages>
false
</GenerateTintedImages>
<GenerateGradientImages>
false
</GenerateGradientImages>
<GenerateThreeChannelImages>
false
</GenerateThreeChannelImages>
<GenerateStandardThreeChannelImages>
false
</GenerateStandardThreeChannelImages>
<GenerateCustomThreeChannelImages>
false
</GenerateCustomThreeChannelImages>
<GenerateCalculatedThreeChannelImages>
false
</GenerateCalculatedThreeChannelImages>
<GenerateLumaColourImages>
false
</GenerateLumaColourImages>
<GenerateDCSImages>
false
</GenerateDCSImages>
<GenerateStatisticalImageThreeChannelPermutations>
false
</GenerateStatisticalImageThreeChannelPermutations>
<GenerateStatisticalImageThreeChannelPermutationsUnrestricted>
false
</GenerateStatisticalImageThreeChannelPermutationsUnrestricted>
<GenerateLumaColourVariationsFromIndividualBands>
false
</GenerateLumaColourVariationsFromIndividualBands>
<GenerateLumaColourVariationsFromCombinedChannels>
false
</GenerateLumaColourVariationsFromCombinedChannels>
<GenerateLumaColourVariationsFromStatisticalChannels>
false
</GenerateLumaColourVariationsFromStatisticalChannels>
<GenerateLumaColourVariationsFromThreeChannelImages>
false
</GenerateLumaColourVariationsFromThreeChannelImages>
<GenerateLumaColourVariationsFromDCSImages>
false
</GenerateLumaColourVariationsFromDCSImages>
<GenerateDCSImagesFromIndividualChannels>
false
</GenerateDCSImagesFromIndividualChannels>
<GenerateDCSImagesFromCombinedChannels>
false
</GenerateDCSImagesFromCombinedChannels>
<GenerateDCSImagesFromCustomThreeChannelImages>
false
</GenerateDCSImagesFromCustomThreeChannelImages>
<GenerateDCSEnhancedContrast>
false
</GenerateDCSEnhancedContrast>
<CustomGreyscaleChannel>
<ChannelName>
Visible_(Max)
</ChannelName>
<Type>
BandCategory
</Type>
<CategoryName>
HumanVisible
</CategoryName>
<BandCombineMethod>
Max
</BandCombineMethod>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
<OutputTransformation>
Normalize: Standard
</OutputTransformation>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_UV_Purple-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:UltravioletA% * 0.5)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_UV_Purple-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:UltravioletA% * 0.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_UV_Purple-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:UltravioletA% * 1.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_IR_Orange-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:NearInfraredNonSpecific% * 1.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_IR_Orange-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:NearInfraredNonSpecific% * 0.5)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_IR_Orange-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:NearInfraredNonSpecific% * 0.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_NoBandCombination-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:Red% * 0.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_NoBandCombination-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:Green% * 1.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_NoBandCombination-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%SpecialBand:Blue% * 0.5)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_VisMax-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%ChannelByName:Visible_(Max)% * 0.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_VisMax-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%ChannelByName:Visible_(Max)% * 1.0)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VIS_BluishGreen_VisMax-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= (%ChannelByName:Visible_(Max)% * 0.5)
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisNBC_DiffVariation4-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_NoBandCombination-Red% - abs(%ChannelByName:Custom-AGB_IR_Orange-Red% - %ChannelByName:Custom-AGB_UV_Purple-Red%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisNBC_DiffVariation4-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_NoBandCombination-Green% - abs(%ChannelByName:Custom-AGB_IR_Orange-Green% - %ChannelByName:Custom-AGB_UV_Purple-Green%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisNBC_DiffVariation4-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_NoBandCombination-Blue% - abs(%ChannelByName:Custom-AGB_IR_Orange-Blue% - %ChannelByName:Custom-AGB_UV_Purple-Blue%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisMax_DiffVariation4-Red
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_VisMax-Red% - abs(%ChannelByName:Custom-AGB_IR_Orange-Red% - %ChannelByName:Custom-AGB_UV_Purple-Red%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisMax_DiffVariation4-Green
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_VisMax-Green% - abs(%ChannelByName:Custom-AGB_IR_Orange-Green% - %ChannelByName:Custom-AGB_UV_Purple-Green%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomGreyscaleChannel>
<ChannelName>
Custom-AGB_VisMax_DiffVariation4-Blue
</ChannelName>
<Type>
CustomScriptCode
</Type>
<CustomScriptCode>
= abs(%ChannelByName:Custom-AGB_VIS_BluishGreen_VisMax-Blue% - abs(%ChannelByName:Custom-AGB_IR_Orange-Blue% - %ChannelByName:Custom-AGB_UV_Purple-Blue%))
</CustomScriptCode>
<UseAsLuminanceChannel>
false
</UseAsLuminanceChannel>
<UseAsThreeChannelChannel>
false
</UseAsThreeChannelChannel>
</CustomGreyscaleChannel>
<CustomThreeChannelImage>
<UserDefinedName>
FC-3C-Custom-AGB_VisNBC_DiffVariation4
</UserDefinedName>
<RedChannelName>
Custom-AGB_VisNBC_DiffVariation4-Red
</RedChannelName>
<GreenChannelName>
Custom-AGB_VisNBC_DiffVariation4-Green
</GreenChannelName>
<BlueChannelName>
Custom-AGB_VisNBC_DiffVariation4-Blue
</BlueChannelName>
<IncludeInSecondOrderImages>
true
</IncludeInSecondOrderImages>
<OutputTransformation>
Normalize: Standard
</OutputTransformation>
</CustomThreeChannelImage>
<CustomThreeChannelImage>
<UserDefinedName>
FC-3C-Custom-AGB_VisMax_DiffVariation4
</UserDefinedName>
<RedChannelName>
Custom-AGB_VisMax_DiffVariation4-Red
</RedChannelName>
<GreenChannelName>
Custom-AGB_VisMax_DiffVariation4-Green
</GreenChannelName>
<BlueChannelName>
Custom-AGB_VisMax_DiffVariation4-Blue
</BlueChannelName>
<IncludeInSecondOrderImages>
true
</IncludeInSecondOrderImages>
<OutputTransformation>
Normalize: Standard
</OutputTransformation>
</CustomThreeChannelImage>