Basic Image Clustering by Color

RickyfoxRickyfox Member Posts: 9 Contributor II
edited July 2019 in Help
Hello everyone,

I'm pretty new to Rapidminer and Data Mining in general and wanted to try to cluster a collection of color images by color. After some time experimenting with rapidminer I managed to create a somewhat correct looking process, but I still get unidentified errors. 

Below is the xml of my process.Note that this process is atm just clustering by general image features, not color in particular. Basically what I tried is loading images from multiple sources using the MCIO operator. As a subprocess of this, I use local feature extraction with POIs generated from an integral image source.
The resulting exampleset is then used for clustering by SVM.

Where did I go wrong with this process? Would you mind pointing out  my mistakes and propose a possible solution?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.013">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="imageprocessing:multiple_color_image_opener" compatibility="1.4.001" expanded="true" height="60" name="MCIO" width="90" x="45" y="30">
        <list key="images">
          <parameter key="birne" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\AbateFetelPear"/>
          <parameter key="acorn" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\Acorn"/>
          <parameter key="almond" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\Almond"/>
        </list>
        <parameter key="assign_label" value="true"/>
        <process expanded="true">
          <operator activated="true" class="multiply" compatibility="5.3.013" expanded="true" height="94" name="Multiply" width="90" x="45" y="30"/>
          <operator activated="true" class="imageprocessing:color_to_grayscale" compatibility="1.4.001" expanded="true" height="60" name="Color to grayscale (3)" width="90" x="179" y="120"/>
          <operator activated="true" class="imageprocessing:integral_image" compatibility="1.4.001" expanded="true" height="60" name="Integral Image" width="90" x="313" y="120"/>
          <operator activated="true" class="imageprocessing:interest_poin_detector" compatibility="1.4.001" expanded="true" height="60" name="interest_poin_detector" width="90" x="447" y="120">
            <parameter key="point_count" value="800"/>
          </operator>
          <operator activated="true" class="imageprocessing:feature_extraction_operator2" compatibility="1.4.001" expanded="true" height="94" name="Local Feature Extractor with Points" width="90" x="581" y="30">
            <process expanded="true">
              <operator activated="true" class="imageprocessing:color_to_grayscale" compatibility="1.4.001" expanded="true" height="60" name="Color to grayscale (4)" width="90" x="45" y="30"/>
              <operator activated="true" class="imageprocessing:contrast_of_gray_level_values" compatibility="1.4.001" expanded="true" height="60" name="contrast_of_gray_level_values" width="90" x="179" y="30"/>
              <connect from_port="image 1" to_op="Color to grayscale (4)" to_port="color image plus"/>
              <connect from_op="Color to grayscale (4)" from_port="grayscale image" to_op="contrast_of_gray_level_values" to_port="grayscale image plus"/>
              <connect from_op="contrast_of_gray_level_values" from_port="feature" to_port="feature 1"/>
              <portSpacing port="source_image 1" spacing="0"/>
              <portSpacing port="source_image 2" spacing="0"/>
              <portSpacing port="sink_feature 1" spacing="0"/>
              <portSpacing port="sink_feature 2" spacing="0"/>
            </process>
          </operator>
          <connect from_port="color image plus" to_op="Multiply" to_port="input"/>
          <connect from_op="Multiply" from_port="output 1" to_op="Local Feature Extractor with Points" to_port="color image plus"/>
          <connect from_op="Multiply" from_port="output 2" to_op="Color to grayscale (3)" to_port="color image plus"/>
          <connect from_op="Color to grayscale (3)" from_port="grayscale image" to_op="Integral Image" to_port="grayscale image plus"/>
          <connect from_op="Integral Image" from_port="integral image" to_op="interest_poin_detector" to_port="Integral Image"/>
          <connect from_op="interest_poin_detector" from_port="Points" to_op="Local Feature Extractor with Points" to_port="points"/>
          <connect from_op="Local Feature Extractor with Points" from_port="example set" to_port="Example set"/>
          <portSpacing port="source_color image plus" spacing="0"/>
          <portSpacing port="sink_Example set" spacing="0"/>
        </process>
      </operator>
      <operator activated="true" class="support_vector_clustering" compatibility="5.3.013" expanded="true" height="76" name="Clustering (2)" width="90" x="246" y="30"/>
      <connect from_op="MCIO" from_port="example set" to_op="Clustering (2)" to_port="example set"/>
      <connect from_op="Clustering (2)" from_port="cluster model" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>
Tagged:

Answers

  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hello Rickyfox,
    if you want to cluster images by color, it is maybe better to use global image features.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.009">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.009" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="imageprocessing:multiple_color_image_opener" compatibility="1.3.003" expanded="true" height="60" name="MCIO" width="90" x="45" y="30">
            <list key="images">
              <parameter key="birne" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\AbateFetelPear"/>
              <parameter key="acorn" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\Acorn"/>
              <parameter key="almond" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\Almond"/>
            </list>
            <parameter key="assign_label" value="true"/>
            <process expanded="true">
              <operator activated="true" class="imageprocessing:global_feature_extraction" compatibility="1.3.003" expanded="true" height="60" name="Global Feature Extractor from a Single Image" width="90" x="179" y="30">
                <process expanded="true">
                  <operator activated="true" class="imageprocessing:statistics" compatibility="1.3.003" expanded="true" height="60" name="Global statistics" width="90" x="179" y="30"/>
                  <operator activated="true" class="imageprocessing:histogram" compatibility="1.3.003" expanded="true" height="60" name="histogram" width="90" x="179" y="120"/>
                  <operator activated="true" class="imageprocessing:color_to_grayscale" compatibility="1.3.003" expanded="true" height="60" name="Color to grayscale" width="90" x="45" y="165"/>
                  <operator activated="true" class="imageprocessing:obcf" compatibility="1.3.003" expanded="true" height="60" name="OBCF" width="90" x="179" y="210"/>
                  <connect from_port="color image plus 1" to_op="Global statistics" to_port="color image plus"/>
                  <connect from_port="color image plus 2" to_op="histogram" to_port="color image plus"/>
                  <connect from_port="color image plus 3" to_op="Color to grayscale" to_port="color image plus"/>
                  <connect from_op="Global statistics" from_port="features" to_port="feature 1"/>
                  <connect from_op="histogram" from_port="features" to_port="feature 2"/>
                  <connect from_op="Color to grayscale" from_port="grayscale image" to_op="OBCF" to_port="grayscale image plus"/>
                  <connect from_op="OBCF" from_port="features" to_port="feature 3"/>
                  <portSpacing port="source_color image plus 1" spacing="0"/>
                  <portSpacing port="source_color image plus 2" spacing="0"/>
                  <portSpacing port="source_color image plus 3" spacing="0"/>
                  <portSpacing port="source_color image plus 4" spacing="0"/>
                  <portSpacing port="sink_feature 1" spacing="0"/>
                  <portSpacing port="sink_feature 2" spacing="0"/>
                  <portSpacing port="sink_feature 3" spacing="0"/>
                  <portSpacing port="sink_feature 4" spacing="0"/>
                </process>
              </operator>
              <connect from_port="color image plus" to_op="Global Feature Extractor from a Single Image" to_port="color image plus"/>
              <connect from_op="Global Feature Extractor from a Single Image" from_port="example set" to_port="Example set"/>
              <portSpacing port="source_color image plus" spacing="0"/>
              <portSpacing port="sink_Example set" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="support_vector_clustering" compatibility="5.3.009" expanded="true" height="76" name="Clustering (2)" width="90" x="246" y="30"/>
          <connect from_op="MCIO" from_port="example set" to_op="Clustering (2)" to_port="example set"/>
          <connect from_op="Clustering (2)" from_port="cluster model" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>
    If you want to use your process, what error appears?

    Best,
    Vaclav
  • RickyfoxRickyfox Member Posts: 9 Contributor II
    Thanks for your answer Vaclav,

    when running my process I get a promt basically saying 'no obvious error encountered but something went wrong' . To have a better look at it I activated debug mode and got a 3744 error that shows that a Array Out of Bounds exception happened.

    I'll use global features as suggested and come back here with my progres ;)
  • RickyfoxRickyfox Member Posts: 9 Contributor II
    With most of the images in my collection being a fruit/vegetable in the center with white background (>70% of the screen in most cases) the background might be a problem for color clustering because on a testset of data I only get one cluster with all images in it.

    Taking a closer look at the attributes of different images in this one cluster, I can see that the attribute distribution is pretty dense which explains why there is only one cluster.
    Does anyone have an idea how I can fix this? Is it possible to automatically crop the images viewed by the process to the center of the image?
  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hello Rickyfox,
    maybe you can use segmentation, select segments which are not background, merge them and then use Crop Image By Mask Operator.

    Best,
    Vaclav
  • RickyfoxRickyfox Member Posts: 9 Contributor II
    StaryVena wrote:

    Hello Rickyfox,
    maybe you can use segmentation, select segments which are not background, merge them and then use Crop Image By Mask Operator.

    Best,
    Vaclav
    How should I tackle that? If I use 'image_k_means' to segment the image it should use basic image features like color values etc in as attributes to segment by - is that a valid approach?
    Also, what do I do with the segments I recieve? Would you mind elaborating what you mean by 'select segments which are not background' ?

  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hello Rickyfox,
    you can use this process:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.009">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.009" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="imageprocessing:open_color_image" compatibility="1.3.003" expanded="true" height="60" name="Open Color Image" width="90" x="45" y="30">
            <parameter key="filename" value="C:\Users\xuherv00\Pictures\fruit-questions-1.jpg"/>
            <parameter key="set_mask" value="false"/>
          </operator>
          <operator activated="true" class="multiply" compatibility="5.3.009" expanded="true" height="94" name="Multiply" width="90" x="112" y="120"/>
          <operator activated="true" class="imageprocessing:color_to_grayscale" compatibility="1.3.003" expanded="true" height="60" name="Color to grayscale" width="90" x="246" y="165"/>
          <operator activated="true" class="imageprocessing:statistical_region_merging" compatibility="1.3.003" expanded="true" height="60" name="statistical_region_merging" width="90" x="246" y="30">
            <parameter key="q" value="1"/>
          </operator>
          <operator activated="true" class="imageprocessing:segment_filter_by_order" compatibility="1.3.003" expanded="true" height="60" name="segment_filter_by_order" width="90" x="380" y="30"/>
          <operator activated="true" class="imageprocessing:merge_segments_to_image" compatibility="1.3.003" expanded="true" height="76" name="merge_segments_to_image" width="90" x="514" y="30"/>
          <operator activated="true" class="imageprocessing:cropimage" compatibility="1.3.003" expanded="true" height="76" name="Crop Image by Mask" width="90" x="514" y="165"/>
          <connect from_op="Open Color Image" from_port="color image plus" to_op="Multiply" to_port="input"/>
          <connect from_op="Multiply" from_port="output 1" to_op="statistical_region_merging" to_port="color image plus"/>
          <connect from_op="Multiply" from_port="output 2" to_op="Color to grayscale" to_port="color image plus"/>
          <connect from_op="Color to grayscale" from_port="grayscale image" to_op="Crop Image by Mask" to_port="greyscale image plus UV"/>
          <connect from_op="statistical_region_merging" from_port="segmented image" to_op="segment_filter_by_order" to_port="seg"/>
          <connect from_op="segment_filter_by_order" from_port="seg" to_op="merge_segments_to_image" to_port="segments"/>
          <connect from_op="merge_segments_to_image" from_port="segmeted image with one mask" to_op="Crop Image by Mask" to_port="greyscale image plus Y"/>
          <connect from_op="Crop Image by Mask" from_port="greyscale image plus UV" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="18"/>
          <portSpacing port="sink_result 2" spacing="126"/>
        </process>
      </operator>
    </process>
    Unfortunately it works only for gray scale images. But you can use the Evaluation version from http://www.burgsys.com/mumi-image-mining.php#tabs-1. It is free for non commercial use.

    Best,
    Vaclav
  • RickyfoxRickyfox Member Posts: 9 Contributor II
    StaryVena wrote:

    Hello Rickyfox,
    you can use this process:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.009">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.009" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="imageprocessing:open_color_image" compatibility="1.3.003" expanded="true" height="60" name="Open Color Image" width="90" x="45" y="30">
            <parameter key="filename" value="C:\Users\xuherv00\Pictures\fruit-questions-1.jpg"/>
            <parameter key="set_mask" value="false"/>
          </operator>
          <operator activated="true" class="multiply" compatibility="5.3.009" expanded="true" height="94" name="Multiply" width="90" x="112" y="120"/>
          <operator activated="true" class="imageprocessing:color_to_grayscale" compatibility="1.3.003" expanded="true" height="60" name="Color to grayscale" width="90" x="246" y="165"/>
          <operator activated="true" class="imageprocessing:statistical_region_merging" compatibility="1.3.003" expanded="true" height="60" name="statistical_region_merging" width="90" x="246" y="30">
            <parameter key="q" value="1"/>
          </operator>
          <operator activated="true" class="imageprocessing:segment_filter_by_order" compatibility="1.3.003" expanded="true" height="60" name="segment_filter_by_order" width="90" x="380" y="30"/>
          <operator activated="true" class="imageprocessing:merge_segments_to_image" compatibility="1.3.003" expanded="true" height="76" name="merge_segments_to_image" width="90" x="514" y="30"/>
          <operator activated="true" class="imageprocessing:cropimage" compatibility="1.3.003" expanded="true" height="76" name="Crop Image by Mask" width="90" x="514" y="165"/>
          <connect from_op="Open Color Image" from_port="color image plus" to_op="Multiply" to_port="input"/>
          <connect from_op="Multiply" from_port="output 1" to_op="statistical_region_merging" to_port="color image plus"/>
          <connect from_op="Multiply" from_port="output 2" to_op="Color to grayscale" to_port="color image plus"/>
          <connect from_op="Color to grayscale" from_port="grayscale image" to_op="Crop Image by Mask" to_port="greyscale image plus UV"/>
          <connect from_op="statistical_region_merging" from_port="segmented image" to_op="segment_filter_by_order" to_port="seg"/>
          <connect from_op="segment_filter_by_order" from_port="seg" to_op="merge_segments_to_image" to_port="segments"/>
          <connect from_op="merge_segments_to_image" from_port="segmeted image with one mask" to_op="Crop Image by Mask" to_port="greyscale image plus Y"/>
          <connect from_op="Crop Image by Mask" from_port="greyscale image plus UV" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="18"/>
          <portSpacing port="sink_result 2" spacing="126"/>
        </process>
      </operator>
    </process>
    Unfortunately it works only for gray scale images. But you can use the Evaluation version from http://www.burgsys.com/mumi-image-mining.php#tabs-1. It is free for non commercial use.

    Best,
    Vaclav
    Thx I used another operator to crop the image to the center of my images, but thanks for the process.
    Also, I downloaded the evaluation version which is a really great addition. My problem atm is, that I need an exampleset for the clustering process
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.013">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="image:read_image_set" compatibility="5.0.000" expanded="true" height="60" name="Read Image Set" width="90" x="45" y="120">
            <list key="categories">
              <parameter key="AbateFetelPear" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\AbateFetelPear"/>
              <parameter key="Acorn" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\Acorn"/>
            </list>
          </operator>
          <operator activated="true" class="loop_collection" compatibility="5.3.013" expanded="true" height="76" name="Loop Collection" width="90" x="246" y="120">
            <process expanded="true">
              <operator activated="true" class="image:crop_image" compatibility="5.0.000" expanded="true" height="60" name="Crop Image" width="90" x="45" y="30">
                <parameter key="x" value="1200"/>
                <parameter key="y" value="600"/>
                <parameter key="width" value="3637"/>
                <parameter key="height" value="2562"/>
              </operator>
              <operator activated="true" class="image:global_feature_extractor" compatibility="5.0.000" expanded="true" height="60" name="Global Feature Extractor (3)" width="90" x="246" y="30">
                <parameter key="include_label" value="false"/>
                <parameter key="include_color_type" value="true"/>
                <parameter key="include_dimensions" value="true"/>
                <process expanded="true">
                  <operator activated="true" class="image:global_statistics" compatibility="5.0.000" expanded="true" height="60" name="Global Statistics" width="90" x="112" y="30"/>
                  <operator activated="true" class="image:global_histogram" compatibility="5.0.000" expanded="true" height="60" name="Global Histogram" width="90" x="112" y="120">
                    <parameter key="color histogram" value="false"/>
                  </operator>
                  <operator activated="true" class="image:order_based_block_color" compatibility="5.0.000" expanded="true" height="60" name="OBBC" width="90" x="112" y="210"/>
                  <connect from_port="image 1" to_op="Global Statistics" to_port="image"/>
                  <connect from_port="image 2" to_op="Global Histogram" to_port="image"/>
                  <connect from_port="image 3" to_op="OBBC" to_port="image"/>
                  <connect from_op="Global Statistics" from_port="feature" to_port="feature 1"/>
                  <connect from_op="Global Histogram" from_port="feature" to_port="feature 2"/>
                  <connect from_op="OBBC" from_port="feature" to_port="feature 3"/>
                  <portSpacing port="source_image 1" spacing="0"/>
                  <portSpacing port="source_image 2" spacing="0"/>
                  <portSpacing port="source_image 3" spacing="0"/>
                  <portSpacing port="source_image 4" spacing="0"/>
                  <portSpacing port="sink_feature 1" spacing="0"/>
                  <portSpacing port="sink_feature 2" spacing="0"/>
                  <portSpacing port="sink_feature 3" spacing="0"/>
                  <portSpacing port="sink_feature 4" spacing="0"/>
                </process>
              </operator>
              <connect from_port="single" to_op="Crop Image" to_port="image"/>
              <connect from_op="Crop Image" from_port="image" to_op="Global Feature Extractor (3)" to_port="image"/>
              <connect from_op="Global Feature Extractor (3)" from_port="example set" to_port="output 1"/>
              <portSpacing port="source_single" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
              <portSpacing port="sink_output 2" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="k_means" compatibility="5.3.013" expanded="true" height="76" name="Clustering" width="90" x="380" y="120"/>
          <operator activated="true" class="imageprocessing:create_clusters" compatibility="1.4.001" expanded="true" height="60" name="create_clusters" width="90" x="514" y="120"/>
          <connect from_op="Read Image Set" from_port="collection of images" to_op="Loop Collection" to_port="collection"/>
          <connect from_op="Loop Collection" from_port="output 1" to_op="Clustering" to_port="example set"/>
          <connect from_op="Clustering" from_port="cluster model" to_op="create_clusters" to_port="clusters"/>
          <connect from_op="Clustering" from_port="clustered set" to_port="result 2"/>
          <connect from_op="create_clusters" from_port="clusters" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
        </process>
      </operator>
    </process>
    Here I use the feature extraction operators in the evaluation version which use the 'ima' input. I was forced to use 'read image set' because the rest of the data import operators for images do not return the necessary formats
  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hello Rickyfox,
    if you want to read multiple images from multiple folders, you have to use process similar to this one:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.013">
     <context>
       <input/>
       <output/>
       <macros/>
     </context>
     <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
       <process expanded="true">
         <operator activated="true" class="loop_files" compatibility="5.3.013" expanded="true" height="76" name="Loop Files" width="90" x="112" y="30">
           <parameter key="directory" value="C:\Users\nick\Pictures\fruitveggiecollection\JPG\"/>
           <parameter key="file_name_macro" value="folder_name"/>
           <parameter key="file_path_macro" value="folder_path"/>
           <parameter key="parent_path_macro" value="folder_parent_path"/>
           <parameter key="iterate_over_files" value="false"/>
           <parameter key="iterate_over_subdirs" value="true"/>
           <process expanded="true">
             <operator activated="true" class="loop_files" compatibility="5.3.013" expanded="true" height="76" name="Loop Files (2)" width="90" x="246" y="30">
               <parameter key="directory" value="%{folder_path}"/>
               <process expanded="true">
                 <operator activated="true" class="image:read_image" compatibility="5.0.000" expanded="true" height="60" name="Read Image" width="90" x="246" y="30">
                   <parameter key="set_label" value="automatic"/>
                   <parameter key="label" value="dfsf"/>
                 </operator>
                 <operator activated="true" class="image:crop_image" compatibility="5.0.000" expanded="true" height="60" name="Crop Image" width="90" x="447" y="30">
                   <parameter key="x" value="1200"/>
                   <parameter key="y" value="600"/>
                   <parameter key="width" value="3637"/>
                   <parameter key="height" value="2562"/>
                 </operator>
                 <operator activated="true" class="image:global_feature_extractor" compatibility="5.0.000" expanded="true" height="60" name="Global Feature Extractor (3)" width="90" x="715" y="30">
                   <parameter key="include_color_type" value="true"/>
                   <parameter key="include_dimensions" value="true"/>
                   <process expanded="true">
                     <operator activated="true" class="image:global_statistics" compatibility="5.0.000" expanded="true" height="60" name="Global Statistics" width="90" x="447" y="30"/>
                     <operator activated="true" class="image:global_histogram" compatibility="5.0.000" expanded="true" height="60" name="Global Histogram" width="90" x="447" y="120">
                       <parameter key="color histogram" value="false"/>
                     </operator>
                     <operator activated="true" class="image:order_based_block_color" compatibility="5.0.000" expanded="true" height="60" name="OBBC" width="90" x="447" y="210"/>
                     <connect from_port="image 1" to_op="Global Statistics" to_port="image"/>
                     <connect from_port="image 2" to_op="Global Histogram" to_port="image"/>
                     <connect from_port="image 3" to_op="OBBC" to_port="image"/>
                     <connect from_op="Global Statistics" from_port="feature" to_port="feature 1"/>
                     <connect from_op="Global Histogram" from_port="feature" to_port="feature 2"/>
                     <connect from_op="OBBC" from_port="feature" to_port="feature 3"/>
                     <portSpacing port="source_image 1" spacing="0"/>
                     <portSpacing port="source_image 2" spacing="0"/>
                     <portSpacing port="source_image 3" spacing="0"/>
                     <portSpacing port="source_image 4" spacing="0"/>
                     <portSpacing port="sink_feature 1" spacing="0"/>
                     <portSpacing port="sink_feature 2" spacing="0"/>
                     <portSpacing port="sink_feature 3" spacing="0"/>
                     <portSpacing port="sink_feature 4" spacing="0"/>
                   </process>
                 </operator>
                 <connect from_port="file object" to_op="Read Image" to_port="file"/>
                 <connect from_op="Read Image" from_port="output" to_op="Crop Image" to_port="image"/>
                 <connect from_op="Crop Image" from_port="image" to_op="Global Feature Extractor (3)" to_port="image"/>
                 <connect from_op="Global Feature Extractor (3)" from_port="example set" to_port="out 1"/>
                 <portSpacing port="source_file object" spacing="0"/>
                 <portSpacing port="source_in 1" spacing="0"/>
                 <portSpacing port="source_in 2" spacing="0"/>
                 <portSpacing port="sink_out 1" spacing="0"/>
                 <portSpacing port="sink_out 2" spacing="0"/>
               </process>
             </operator>
             <connect from_port="file object" to_op="Loop Files (2)" to_port="in 1"/>
             <connect from_op="Loop Files (2)" from_port="out 1" to_port="out 1"/>
             <portSpacing port="source_file object" spacing="0"/>
             <portSpacing port="source_in 1" spacing="0"/>
             <portSpacing port="sink_out 1" spacing="0"/>
             <portSpacing port="sink_out 2" spacing="0"/>
           </process>
         </operator>
         <operator activated="true" class="append" compatibility="5.3.013" expanded="true" height="76" name="Append" width="90" x="246" y="30"/>
         <connect from_op="Loop Files" from_port="out 1" to_op="Append" to_port="example set 1"/>
         <connect from_op="Append" from_port="merged set" to_port="result 1"/>
         <portSpacing port="source_input 1" spacing="0"/>
         <portSpacing port="sink_result 1" spacing="0"/>
         <portSpacing port="sink_result 2" spacing="0"/>
       </process>
     </operator>
    </process>
    Best,
    Vaclav
Sign In or Register to comment.