CIB image toolbox technical manual

11. Algorithms sets

Algorithms sets are used for describing of complex image processing procedures. Algorithm can be described in two ways:

  • sequence of image filters,
  • directed graph of image processors.

The first way allows usage of image filters only. In this case we just describe an order of filters call. For example:
<algorithms> 
...
      <algorithm name="SimpleAlgorithm">
          <filter type="HuangBilateralFilter" params="KernelSize:11" />          
<filter type="SavoulaBinarizerFilter" params="WindowSize:101|ThresholdCoefficient:0.015" />
          <filter type="OpenFilter" params="IterationCount:2" />
      </algorithm>  ...
  </algorithms>

This sample shows sequential filtration of single input image by three filters:




The second way allows usage of all processors (filters, segmenters, mergers). In this case we describe algorithm as set of processor blocks combined to layers and input/output of each block. For example:

  <algorithms> 
...>      
<algorithm name="GraphAlgorithm" inputs="in1=$1|in2=$2" outputs="l1p1o1=$1|l2p1o1=$2">         
<layer>
               <processor type="ColorRangesFilter" params="IsMaskOnlyRequired:0|IsInRangeColorsRequired:1|LowerBondaries:0,0,0|
UpperBondaries:96,96,96"
inputs="in1" outputs="l1p1o1" />
               <processortype="ColorSpaceConvertionFilter" params="TargetColorspace:GRAY" inputs="in2" outputs="l1p2o1" />          
</layer>>          
<layer>
               <processor type="AlphaChannelMerger" params="AlphaChannelValue:128" inputs="l1p1o1|l1p2o1" outputs="l2p1o1" />          
</layer>      
</algorithm> 
...  
</algorithms>

   

This sample shows processing of two files with further merging of preliminary processing results: