Package de.mpi.rgblab.color

Examples of de.mpi.rgblab.color.ColorModel


    // Iterator it_map_matrix2;
    // Iterator it_tmp = it_map_matrix1;

    double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
    Vector<Double> key_row, key_row2, value_row;
    ColorModel tmp;
    double z = 0;

    Vector<ColorModel> labColors = new Vector<ColorModel>();
    rgbToLabColors(rgbColors, labColors);
View Full Code Here


    // Iterator it_map_matrix2;
    // Iterator it_tmp = it_map_matrix1;

    double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
    Vector<Double> key_row, key_row2, value_row;
    ColorModel tmp;
    double z = 0;

    Vector<ColorModel> labColors = new Vector<ColorModel>();
    rgbToLabColors(rgbColors, labColors);
View Full Code Here

          Double my_data_value = Double.valueOf(result[i]);
          data_item.addElement(my_data_value);

        }
       
        ColorModel my_color = new ColorModel();
        my_color.setDimension_1(data_item.elementAt(0));
        my_color.setDimension_2(data_item.elementAt(1));
        my_color.setDimension_3(data_item.elementAt(2));
        my_color.setType(ColorType.RGB);
       
        data.addElement(my_color);

      }
View Full Code Here

    }
    initMinSaliency();
    initMaxSaliency();
    // saliency.clear();

    ColorModel currentPointColor;

    int l;
    int z = 0;

    for (int i = 0; i < number_points; i++) {
View Full Code Here

    double vis;
    // int x, y;
    int l;
    Vector<Vector<Integer>> surrounding = input.getSurrounding();

    ColorModel currentPointColor;
    Vector<Integer> current_surrounding; // = new
    // Vector<Integer>(input.getClassNumbers()+1);

    Vector<Double> currentSurroundingColor;
    // Vector<Double> sal_as_vector; // = new Vector<Double>(3);
    double displacementVector[] = new double[3];
    double displacementVectorTmp[] = new double[3];

    // double dim1, dim2, dim3;

    Vector<Dif> sum_dif = new Vector<Dif>();
    // sum_dif.removeAllElements();
    for (int i = 0; i < input.getClassNumbers(); i++)
      sum_dif.add(new Dif());

    for (int i = 0; i < data.size(); i++) {
      vis = visibility.get(i);
      // sal = saliency.get(i);
      // x = data.get(i).get(0);
      // y = data.get(i).get(1);
      l = data.get(i).get(2);

      weight = getWeight(i, input, labColors); // input.getMeanViewVisibility().get(i)
                      // / vis;

      current_surrounding = surrounding.get(i);
      currentPointColor = (ColorModel) labColors.elementAt(l);

      // change local color
      currentSurroundingColor = VisUtil.mean_surrounding_color_as_vector(
          currentPointColor, labColors, current_surrounding, input
              .getClassNumbers());

      // logger.logln("adj.Color.Locally - Center Point Color: " +
      // currentSurroundingColor.toString());
      // logger.logln("adj.Color.Locally - MEAN(Surrounding Color): " +
      // currentSurroundingColor.toString());

      for (int j = 0; j < currentSurroundingColor.size(); j++) {
        displacementVector[j] = currentPointColor.getDimension(j)
            - currentSurroundingColor.get(j);

      }
      double length = Math.sqrt(displacementVector[0]
          * displacementVector[0] + displacementVector[1]
View Full Code Here

    double vis;
    // int x, y;
    int l;
    Vector<Vector<Integer>> surrounding = input.getSurrounding();

    ColorModel currentPointColor;
    Vector<Integer> current_surrounding; // = new
    // Vector<Integer>(input.getClassNumbers()+1);

    Vector<Double> currentSurroundingColor;
    // Vector<Double> sal_as_vector; // = new Vector<Double>(3);
    double displacementVector[] = new double[3];
    double displacementVectorTmp[] = new double[3];

    // double dim1, dim2, dim3;

    Vector<Dif> sum_dif = new Vector<Dif>();
    // sum_dif.removeAllElements();
    for (int i = 0; i < input.getClassNumbers(); i++)
      sum_dif.add(new Dif());

    for (int i = 0; i < data.size(); i++) {
      vis = visibility.get(i);
      l = data.get(i).get(2);

      //weight = input.getMeanViewVisibility().get(i) / vis;
      weight = getWeight(i, input, labColors);
      current_surrounding = surrounding.get(i);
      currentPointColor = (ColorModel) labColors.elementAt(l);

      // change local color
      currentSurroundingColor = VisUtil.mean_surrounding_color_as_vector(
          currentPointColor, labColors, current_surrounding, input
              .getClassNumbers());

      for (int j = 0; j < currentSurroundingColor.size(); j++) {
        displacementVector[j] = currentPointColor.getDimension(j)
            - currentSurroundingColor.get(j);

      }
      double length = Math.sqrt(displacementVector[0]
          * displacementVector[0] + displacementVector[1]
View Full Code Here

      // a = labColors.get(i).getDimension_2();
      // b = labColors.get(i).getDimension_3();
      // }
      // b = a*c;

      ColorModel cm = new ColorModel();
      cm.setDimension_1(l);
      cm.setDimension_2(a);
      cm.setDimension_3(b);

      // cm.setDimension_1(LAB.getCorrectL(l));
      // cm.setDimension_2(LAB.getCorrectA(a));
      // cm.setDimension_3(LAB.getCorrectB(b));
      cm.setType(ColorType.LAB);
      if (LAB.isInRGBSpace(cm))
        res.add(cm);
      else
        res.add(labColors.get(i));
    }
View Full Code Here

          || b < LAB.B_MIN) {
        a = labColors.get(i).getDimension_2();
        b = labColors.get(i).getDimension_3();
      }

      ColorModel cm = new ColorModel();
      cm.setDimension_1(l);
      cm.setDimension_2(a);
      cm.setDimension_3(b);

      // cm.setDimension_1(LAB.getCorrectL(l));
      // cm.setDimension_2(LAB.getCorrectA(a));
      // cm.setDimension_3(LAB.getCorrectB(b));
      cm.setType(ColorType.LAB);
      // if (LAB.isInRGBSpace(cm))
      res.add(cm);
      // else
      // res.add(labColors.get(i));
    }
View Full Code Here

        a = labColors.get(i).getDimension_2();
        // b = labColors.get(i).getDimension_3();
      }
      b = a * c;

      ColorModel cm = new ColorModel();
      // cm.setDimension_1(l);
      // cm.setDimension_2(a);
      // cm.setDimension_3(b);

      cm.setDimension_1(LAB.getCorrectL(l));
      cm.setDimension_2(LAB.getCorrectA(a));
      cm.setDimension_3(LAB.getCorrectB(b));
      cm.setType(ColorType.LAB);
      // if (LAB.isInRGBSpace(cm))
      res.add(cm);
      // else
      // res.add(labColors.get(i));
    }
View Full Code Here

    double z = n * saliency;

    double u;
    double ch = 0;

    ColorModel cm = v_cm.get(l);
    for (int j = 0; j < input.getNumberOfClasses(); j++) {
      n = number_points.get(j);
      u = VisUtil.eucl_distance_center_surrounding(cm, v_cm,
          number_points, input.getNumberOfClasses());
      ch += n * u;
 
View Full Code Here

TOP

Related Classes of de.mpi.rgblab.color.ColorModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.