Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Problem with Global Feature Extractor using Histogram and Global Features

Chriis_Bg25Chriis_Bg25 Member Posts: 6 Contributor II
edited November 2018 in Help
Hello  :),

I tried several times to use the "Global Feature Extractor using Histogram & global features" operator as a subprocess of a MCIO (Multiple Color Image Opener) operator but I had every time an error (java.lang.ArrayIndexOutOfBoundsException).
Is it someone would already have used this operator and/or would have an example ?
Thanks,

Chris

Answers

  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hello Chris,
    I think the "Global Feature Extractor using Histogram & global features" operator is not intended to be used inside "Multiple Color Image Opener" operator.  You can just use "Global Feature Extractor using Histogram & global features" operator. Select folder and add name to each class and that's it. Or you can use "Multiple Color Image Opener" operator with Global Feature Extractor from single image.  Here is example process:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.008">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.008" 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="179" y="30">
            <list key="images">
              <parameter key="animals" value="E:\google\animals"/>
              <parameter key="art" value="E:\google\art"/>
            </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="514" y="30">
                <process expanded="true">
                  <operator activated="true" class="imageprocessing:histogram" compatibility="1.3.003" expanded="true" height="60" name="histogram" width="90" x="246" y="30"/>
                  <operator activated="true" class="imageprocessing:statistics" compatibility="1.3.003" expanded="true" height="60" name="Global statistics" width="90" x="246" y="120"/>
                  <connect from_port="color image plus 1" to_op="histogram" to_port="color image plus"/>
                  <connect from_port="color image plus 2" to_op="Global statistics" to_port="color image plus"/>
                  <connect from_op="histogram" from_port="features" to_port="feature 1"/>
                  <connect from_op="Global statistics" from_port="features" to_port="feature 2"/>
                  <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="sink_feature 1" spacing="0"/>
                  <portSpacing port="sink_feature 2" spacing="0"/>
                  <portSpacing port="sink_feature 3" 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>
          <connect from_op="MCIO" from_port="example 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,
    Václav
  • Chriis_Bg25Chriis_Bg25 Member Posts: 6 Contributor II
    Hi Vaclav,

    Thank you for your reply.

    Actually I would like to combine local & global features extraction inside MCIO Operator for a purpose of automatic image classification.
    I already tried to use one of your former process examples which you had given in the following thread: 

    http://rapid-i.com/rapidforum/index.php/topic,6105.msg21457.html#msg21457

    But it didn't work, the process started to extract features and then failed and I have had the following error message for the "transpose" operator: "No data was delivered at port Transpose.example set input".

    Any ideas ?

    I would have a second question for you. I noted MCIO & MIO didn't load/open all images which are in the given folders. The format of my images are the same (.png) but their sizes are different (some pictures are very small with dimensions: 16x16). Do you believe that it would be a problem ?

    Thanks

    Chris


  • StaryVenaStaryVena Member Posts: 126 Contributor II
    Hi Chris,
    I send you PM, if you can send me some examples of your pictures and I will try it. Without the pictures it is hard to say where the problem is.

    Best,
    Vaclav
Sign In or Register to comment.